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

Joshua 8:29

And the king of Ai he hanged on a tree until eventide: and as soon as the sun was down, Joshua commanded that they should take his carcase down from the tree, and cast it at the entering of the gate of the city, and raise thereon a great heap of stones, that remaineth unto this day.

Read in other translations