Jeremiah 38:2

2Thus says the Lord: aHe who stays in this city shall die by the sword, by famine, and by pestilence, bbut he who goes out to the Chaldeans shall live. He shall have his life as a prize of war, and live.

Jeremiah 38:17-18

17Then Jeremiah said to Zedekiah, “Thus says the Lord, the God of hosts, the God of Israel: cIf you will surrender to dthe officials of the king of Babylon, ethen your life shall be spared, and this city shall not be burned with fire, and you and your house shall live. 18But if you do not surrender to fthe officials of the king of Babylon, gthen this city shall be given into the hand of the Chaldeans, hand they shall burn it with fire, and you shall not escape from their hand.”
Copyright information for ESV