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

John 7:42

Hath not the scripture said, That Christ cometh of the seed of David, and out of the town of Bethlehem, where David was?

Read in other translations