Jeremiah 39:15-18 NKJV

15 Meanwhile the word of the Lord had come to Jeremiah while he was shut up in the court of the prison, saying,
16 "Go and speak to Ebed-Melech the Ethiopian, saying, 'Thus says the Lord of hosts, the God of Israel: "Behold, I will bring My words upon this city for adversity and not for good, and they shall be performed in that day before you.
17 But I will deliver you in that day," says the Lord, "and you shall not be given into the hand of the men of whom you are afraid.
18 For I will surely deliver you, and you shall not fall by the sword; but your life shall be as a prize to you, because you have put your trust in Me," says the Lord.' "