Jeremiah 32:2-3 CSB

2 At that time, the army of the king of Babylon was besieging Jerusalem, and Jeremiah the prophet was imprisoned in the guard's courtyard in the palace of the king of Judah.
3 Zedekiah king of Judah had imprisoned him, saying: "Why are you prophesying, 'This is what the Lord says: Look, I am about to hand this city over to Babylon's king, and he will capture it.