Jeremiah 32:2-3 NIV

2 The army of the king of Babylon was then besieging Jerusalem, and Jeremiah the prophet was confined in the courtyard of the guard in the royal palace of Judah.

References for Jeremiah 32:2

3 Now Zedekiah king of Judah had imprisoned him there, saying, “Why do you prophesy as you do? You say, ‘This is what the LORD says: I am about to give this city into the hands of the king of Babylon, and he will capture it.

References for Jeremiah 32:3