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

Psalms 107:17

Fools because of their transgression, and because of their iniquities, are afflicted.

Read in other translations