Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
KJV

Deuteronomy 21:22

And if a man have committed a sin worthy of death, and he be to be put to death, and thou hang him on a tree:

Read in other translations