NET
2 Now at that time, the armies of the king of Babylon were besieging Jerusalem. The prophet Jeremiah was confined in the courtyard of the guardhouse attached to the royal palace of Judah.
Darby
2 And the king of Babylon's army was then besieging Jerusalem; and the prophet Jeremiah was shut up in the court of the guard, which was in the king of Judah's house.
KJV
2 For then the king of Babylon's army besieged Jerusalem: and Jeremiah the prophet was shut up in the court of the prison, which [was] in the king of Judah's house.