For thus says the LORD: David shall never lack a man to sit on the throne of the house of Israel, and the Levitical priests shall never lack a man in my presence to offer burnt offerings, to burn grain offerings, and to make sacrifices forever. (Jeremiah 33:17-18)
On the face of it, this seems to suggest that the dynasty of David and the Levitical priesthood would never die out. However, we know that there is currently no king on David’s throne (although Jesus is coming to claim it) and there are currently no Levites offering sacrifices. Furthermore, a contemporary prophet said about the dynasty of David
And you, O profane wicked one, prince of Israel, whose day has come, the time of your final punishment, thus says the Lord GOD: Remove the turban and take off the crown. Things shall not remain as they are. Exalt that which is low, and bring low that which is exalted. A ruin, ruin, ruin I will make it. This also shall not be, until he comes, the one to whom judgment belongs, and I will give it to him. (Ezekiel 21:25-27)
In other words, there would be no further king of Israel until Messiah came.
This suggests that Jeremiah 33:17 should be understood as meaning that David’s line would never die out — he would always have a descendant, someone eligible to sit on the throne. This is true. There were always people of the line of David until Jesus was born, and he now lives forever.
Because the statement about Levitical priests is parallel to the one about David, I suggest it means that the Levitical line would never die out — there would always be people of the tribe of Levi, people eligible to offer sacrifices if and when it is appropriate. This is true too. There are people today with the surname Kohn, Cohen, etc., indicating they are descendants of priests (Hebrew kohen) and of the tribe of Levi.