...in the nineteenth year of Nebuchadnezzar king of Babylon ... an official of the king of Babylon, came to Jerusalem. He set fire to the temple of the LORD, the royal palace and all the houses of Jerusalem. Every important building he burned down. The whole Babylonian army under the commander of the imperial guard broke down the walls around Jerusalem. ... the commander of the guard carried into exile the people who remained in the city, along with the rest of the populace and those who had deserted to the king of Babylon. But the commander left behind some of the poorest people of the land to work the vineyards and fields.Ok a little history. In the two books of Kings we see the reign of David's son King Solomon who end's up turning away from God. After Solomon his son Rehoboam becomes the King. A civil war divides Israel into two kingdoms: Israel in the north and Judah in the south. The king of Assyria defeats the Kingdom of Israel in the north and carries the people away into his land of Assyria. The southern kingdom lasts another 130 years before the king of Babylon destroys Jerusalem, the capital of the Kingdom of Judah, and carries away the people of Judah into captivity in Babylon. Solomon's temple is destroyed and 70 years of foreign captivity begin. That is where we are now after this passage at the end of the second book of Kings.
... In the thirty-seventh year of the exile of Jehoiachin king of Judah, in the year Awel-Marduk became king of Babylon, he released Jehoiachin king of Judah from prison. ... He spoke kindly to him and gave him a seat of honor higher than those of the other kings who were with him in Babylon. So Jehoiachin put aside his prison clothes and for the rest of his life ate regularly at the king's table. Day by day the king gave Jehoiachin a regular allowance as long as he lived.
It is important to note that the bible records that nearly all of the kings in the northern kingdom did evil, turned away from God and sought after other gods. In Judah the verdict is more mixed where some of the kings "did that which was right in the eyes of the LORD". The fall of Israel and Judah was caused by their own unfaithfulness. However, God was still faithful to his promise to David.
"Your house and your kingdom will endure forever before me; your throne will be established forever."God specifically found a way to preserve David's royal line through the captivity so that the Messiah could come from David. We see a glimpse of this at the end of this chapter of 2 Kings. Jehoiachin was imprisoned in Babylon and then released and cared for by the Babylonian king.
I would also point out, on a more personal level, that many view Israel's history, as a nation on the whole in the old testament, as a picture of our individual relationship with God today. I like the way A.W. Tozer puts it in his book titled The Pursuit of God, "`Them that honour me I will honour,‘ said God once to a priest of Israel, and that ancient law of the Kingdom stands today unchanged by the passing of time ... The whole Bible and every page of history proclaim the perpetuation of that law. ... Now set over against this almost any Bible character who honestly tried to glorify God in his earthly walk. See how God winked at weaknesses and overlooked failures as He poured upon His servants grace and blessing untold. Let it be Abraham, Jacob, David, Daniel, Elijah or whom you will; honor followed honor as harvest the seed. The man of God set his heart to exalt God above all; God accepted his intention as fact and acted accordingly. Not perfection, but holy intention made the difference."