In the Septuagint Jeremiah 31:33 says, and I am translating here, "…I will put my Law in their mind and on their heart I will write it." Closer but still not the same.
So what do we do with that?
The writer does not follow the Hebrew and mixes up the Greek version. If it is the case that the Holy Spirit inspired this, and I believe that is the case, what does that mean?
The way I resolve this is that I have to allow the Spirit to do what He wants with the text. I have to deal with Jeremiah 31:33 in that context and Hebrews 10:16 in the context of Hebrews. Others will see this as an error in Scripture. I do not.
It is puzzling. But the sense of Jeremiah’s words are carried forward. I have to be OK with that.