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

Deuteronomy 21:22

And if there be sin in any one, [and] the judgment of death [be upon him], and he be put to death, and ye hang him on a tree:

Read in other translations