This can be translated in active form. Alternate translation: "they were keeping Jeremiah as a prisoner" (See: [[rc://en/ta/man/jit/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/jit/figs-123person]])