The tribes of Judah and Benjamin in the south (with many from Levi)—as the kingdom of Judah—continued under the throne of David, beginning with Solomon’s son Rehoboam.
The northern 10 tribes, however—as the kingdom of Israel—went through a number of different dynasties. And because of the northern kingdom’s continual idolatry, God finally had its people taken into captivity around 733 and 722 B.C. by the Assyrians, who resettled the 10 tribes in what is now northern Iraq and Iran (2 Kings 15, 17). Subsequently, as centuries passed, the 10 tribes were seemingly lost.
Around 20 years after Israel’s final fall, the nation of Judah, following repeated cycles of idolatry and reformation, was invaded by Assyria as well, reducing Judah "to a shadow of its former self, at least two thirds of the population perishing or being carried away captive" ("Judah," The Illustrated Bible Dictionary, 1980, Vol. 2, p. 825). Thus, a great number of Jews, Benjamites and Levites were also taken away to join the Israelite captivity.
God gave the remnant of Judah another century to prove its loyalty and devotion to Him. Yet sadly, despite witnessing Israel’s captivity and experiencing its own bitter taste of it, Judah lapsed into idolatrous rebellion again (see Jeremiah 3:10-11 Jeremiah 3:10-11  And yet for all this her treacherous sister Judah has not turned to me with her whole heart, but feignedly, said the LORD.
 And the LORD said to me, The backsliding Israel has justified herself more than treacherous Judah.
American King James Version×). So God sent the rest of the nation of Judah into captivity as well—this time by the hands of the Babylonians under Nebuchadnezzar II (ca. 604 to 586 B.C.).
The Davidic line had continued all the way to this point, with Zedekiah now reigning over Judah. But according to Jeremiah, the Babylonian forces took the Jewish king to Nebuchadnezzar, who—after killing Zedekiah’s sons in front of his face and slaying "all the nobles of Judah" to ensure that no heir to the throne remained—put out Zedekiah’s eyes and threw him in a dungeon in Babylon, where he eventually died (Jeremiah 39:1-7 Jeremiah 39:1-7  In the ninth year of Zedekiah king of Judah, in the tenth month, came Nebuchadrezzar king of Babylon and all his army against Jerusalem, and they besieged it.
 And in the eleventh year of Zedekiah, in the fourth month, the ninth day of the month, the city was broken up.
 And all the princes of the king of Babylon came in, and sat in the middle gate, even Nergalsharezer, Samgarnebo, Sarsechim, Rabsaris, Nergalsharezer, Rabmag, with all the residue of the princes of the king of Babylon.
 And it came to pass, that when Zedekiah the king of Judah saw them, and all the men of war, then they fled, and went forth out of the city by night, by the way of the king's garden, by the gate between the two walls: and he went out the way of the plain.
 But the Chaldeans' army pursued after them, and overtook Zedekiah in the plains of Jericho: and when they had taken him, they brought him up to Nebuchadnezzar king of Babylon to Riblah in the land of Hamath, where he gave judgment on him.
 Then the king of Babylon slew the sons of Zedekiah in Riblah before his eyes: also the king of Babylon slew all the nobles of Judah.
 Moreover he put out Zedekiah's eyes, and bound him with chains, to carry him to Babylon.
American King James Version×; Jeremiah 52:1-11 Jeremiah 52:1-11  Zedekiah was one and twenty years old when he began to reign, and he reigned eleven years in Jerusalem. And his mother's name was Hamutal the daughter of Jeremiah of Libnah.  And he did that which was evil in the eyes of the LORD, according to all that Jehoiakim had done.  For through the anger of the LORD it came to pass in Jerusalem and Judah, till he had cast them out from his presence, that Zedekiah rebelled against the king of Babylon.  And it came to pass in the ninth year of his reign, in the tenth month, in the tenth day of the month, that Nebuchadrezzar king of Babylon came, he and all his army, against Jerusalem, and pitched against it, and built forts against it round about.  So the city was besieged to the eleventh year of king Zedekiah.  And in the fourth month, in the ninth day of the month, the famine was sore in the city, so that there was no bread for the people of the land.  Then the city was broken up, and all the men of war fled, and went forth out of the city by night by the way of the gate between the two walls, which was by the king's garden; (now the Chaldeans were by the city round about:) and they went by the way of the plain.  But the army of the Chaldeans pursued after the king, and overtook Zedekiah in the plains of Jericho; and all his army was scattered from him.  Then they took the king, and carried him up to the king of Babylon to Riblah in the land of Hamath; where he gave judgment on him.  And the king of Babylon slew the sons of Zedekiah before his eyes: he slew also all the princes of Judah in Riblah.  Then he put out the eyes of Zedekiah; and the king of Babylon bound him in chains, and carried him to Babylon, and put him in prison till the day of his death.
American King James Version×).
There was, it should be noted, a former king of the Solomonic line still alive in the dungeons of Babylon. In fact this man, Jeconiah—also called Coniah or Jehoiachin—was restored to honor 37 years into the Jewish captivity (2 Kings 25:27-30 2 Kings 25:27-30  And it came to pass in the seven and thirtieth year of the captivity of Jehoiachin king of Judah, in the twelfth month, on the seven and twentieth day of the month, that Evilmerodach king of Babylon in the year that he began to reign did lift up the head of Jehoiachin king of Judah out of prison;
 And he spoke kindly to him, and set his throne above the throne of the kings that were with him in Babylon;
 And changed his prison garments: and he did eat bread continually before him all the days of his life.
 And his allowance was a continual allowance given him of the king, a daily rate for every day, all the days of his life.
American King James Version×). He was even given the title "king" along with numerous other captive, vassal rulers. When the Persian conquerors of Babylon later permitted a contingent of Jews to return to their homeland, Jeconiah’s grandson Zerubbabel was made governor—but not king—of Judea.
To dispel any notion that this line could have been the means whereby God preserved the Davidic dynasty, it must be pointed out that God had earlier decreed that no descendant of Jeconiah would ever sit on the throne of David, ruling over Judah (Jeremiah 22:24 Jeremiah 22:24As I live, said the LORD, though Coniah the son of Jehoiakim king of Judah were the signet on my right hand, yet would I pluck you there;
American King James Version×; Jeremiah 22:30 Jeremiah 22:30Thus said the LORD, Write you this man childless, a man that shall not prosper in his days: for no man of his seed shall prosper, sitting on the throne of David, and ruling any more in Judah.
American King James Version×). And none ever did. In fact, while a minority of the Jewish captives did return to the Holy Land following the Babylonian captivity, the Jewish throne was never reestablished there at all.
What, then, of God’s promises that David’s dynasty would never end?