Boyd’s Bible Dictionary:

(tower, keep). [PRISON.]

Concise Bible Dictionary:

Pit used for water, but sometimes dry and used as a prison. Joseph called his prison a dungeon, though perhaps it was not a pit (Gen. 40:15; Gen. 41:14). Jeremiah was put into a pit, and he sank in the mire (Jer. 38:6-13; Lam. 3:53, 55).