King Zedekiah ordered that the prophet Jeremiah be brought to him at the third entrance of the LORD's temple, where the king said to Jeremiah, "I want to ask you something, and don't hide anything from me."
Jeremiah replied, "If I do, you'll kill me! And if I tell you what to do, you won't listen to me!"
So King Zedekiah swore to Jeremiah behind closed doors, "As the LORD lives, who has given us this life, I won't put you to death and I won't hand you over to those who seek to kill you."
So Jeremiah said to Zedekiah: "The LORD of heavenly forces, the God of Israel, proclaims: If you surrender to the officers of the king of Babylon, you and your family will live, and this city will not be burned down.
If you don't surrender to the officers of the king of Babylon, the city will be handed over to the Babylonians, who will burn it down, and you won't escape from them."
King Zedekiah said to Jeremiah, "I'm afraid that I will fall into the hands of the Judeans who have defected to the Babylonians, and they will torture me."
"That won't happen," Jeremiah replied, “if you obey the LORD, whose message I bring. You will survive, and all will go well for you.
But if you refuse to surrender, this is what the LORD has shown me:
All the women left in the palace of the king of Judah will be led out to the officers of the king of Babylon. And they will say: ‘Your trusted friends have betrayed you; they have deceived you; now that your feet are stuck in the mud, they are nowhere to be found.'
"All your wives and children will be led out to the Babylonians, and you yourself won't escape from them. The king of Babylon will capture you, and this city will be burned down."
Zedekiah said to Jeremiah, "No one is to know about these matters or else you will die.
If the officials find out that we met, and they come and say to you, ‘Tell us what you said to the king. Don't hide anything from us; otherwise, we'll kill you. So what did the king say to you?'
you should say to them, ‘I was begging the king not to send me back to the house of Jonathan to die there.'"
Then all the officials approached Jeremiah to question him. And he responded exactly as the king had instructed him. So they stopped interrogating him because the conversation between the king and Jeremiah hadn't been overheard.
References for Jeremiah 38:27