This can be translated in active form. Alternate translation: "they were keeping Jeremiah as a prisoner" (See: [[rc://en/ta/man/translate/figs-activepassive]])
It is not clear why Jeremiah is referring to himself by name here. You may translate using first person. Alternate translation: "I was imprisoned" (See: [[rc://en/ta/man/translate/figs-123person]])