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

Ecclesiastes 2:17

Therefore I hated life; because the work that is wrought under the sun is grievous unto me: for all is vanity and vexation of spirit.

Read in other translations