Some versions understand the Hebrew word in this expression to mean "my life." In that interpretation, the waters were about to take away Jonah's life.
Jonah used a metaphor to compare the earth to a prison. AT: "the earth was like a prison that was about to lock me in forever" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Jonah speaks of the place of the dead as if it were a pit. AT: "But you saved my life from the place of the dead" or "But you saved me from the place where the dead people are" (See: [[rc://en/ta/man/translate/figs-metaphor]])