If you haven’t already figured it out by now, Jeremiah isn’t a chronological presentation. Chapter 33 begins with a reference to the prophet’s imprisonment in the ‘courtyard of the guard.’ We discover in chapter 37 that Jeremiah was imprisoned there after having been placed in a dungeon for a long time. It was a concession granted him by Zedekiah.
Babylon has laid siege to Jerusalem and the conditions are dire. Buildings have been torn down to further fortify the city, and many have taken to escape leaving the city desolate and deserted (though not totally). King Josiah had at least three sons: Jehoahaz, Jehoiakim, and Zedekiah. Jehoahaz had become a captive of Egypt, where he died. Jehoiakim’s lineage was rejected by the Lord (according to Jeremiah 22) and judged unworthy of David’s throne. Zedekiah, it appeared, would be taken captive to Babylon. The house of David would be no more.
But in chapter 33, God makes the astounding promise that David will never fail to have a descendant to sit on his throne. In fact, God says, it would be easier for day and night to cease than for David’s throne to fail to have a successor. God does his most amazing work when the odds are against Him. That’s why, when we find ourselves in a tight spot, the Lord can be trusted to provide deliverance.