Jeremiah was writing to a nation undergoing great turmoil and spoke words of promise giving them hope. Christians read this prophecy and adapt it to our own times.
God has promised to get them through their current disaster (Jer 23:1-3) sending them help (23:4). In Jeremiah's day and culture and circumstances, this help would come through a new king. The Lord tells these people who have deserved every bad thing that has happened to them that they are going to be rescued anyway.
Gene Tucker in Preaching through the Christian Year C:
Although the king is a ideal one, the promise is rooted in flesh and blood and history. This is the promise that the earliest followers of Jesus saw fulfilled in him, the divine will incarnate. Theologically, the Old Testament text enables us to keep our eyes fixed on two points also fundamental to the New Testament witness: the humanity of the Anointed One, and the faith that through him Christ is at work.