Jeremiah 32:2-3 NLT

2 Jerusalem was then under siege from the Babylonian army, and Jeremiah was imprisoned in the courtyard of the guard in the royal palace.
3 King Zedekiah had put him there, asking why he kept giving this prophecy: “This is what the says: ‘I am about to hand this city over to the king of Babylon, and he will take it.