How can this be explained?
ANSWER:
Matthew 27:9-10 states: “Then was fulfilled what was spoken by Jeremiah the prophet, saying, ‘And they took the thirty pieces of silver, the value of Him who was priced, whom they of the children of Israel priced, ‘and gave them for the potter’s field, as the LORD directed me.’”
Notice carefully that Jeremiah spoke these words. If he wrote them, they are not included in the book of Jeremiah.
I similar prophecy is found in the book of Zechariah (Zechariah 11:12-13). This has led some to believe that the word “Jeremiah” in Matthew 27:9 should be “Zechariah.” In all authoritative texts, however, the original was “Jeremiah.”
The simple explanation is that the prophecy was spoken by Jeremiah, not written. Zechariah, writing at a later time, was inspired to record it.