Josiah became the father of Jeconiah [also called Coniah and Jehoiachin] and his brothers, at the time of the deportation (exile) to Babylon. [2 Kin 24:14; 1 Chr 3:15, 16]
Jehoahaz was twenty-three years old when he became king, and he reigned for [only] three months in Jerusalem. His mother’s name was Hamutal daughter of Jeremiah of Libnah.
He led away into exile all Jerusalem and all the captains and all the brave men, ten thousand captives, and all the craftsmen and the smiths. None remained except the poorest people of the land.
Then Nebuzaradan the captain of the bodyguard deported [into exile] the rest of the people who were left in the city and the deserters who had joined the king of Babylon, and the rest of the multitude.
Now at the turn of the year [in the spring], King Nebuchadnezzar sent word and had him brought to Babylon with the valuable articles of the house of the Lord, and made his brother Zedekiah king over Judah and Jerusalem.
He deported to Babylon those who had escaped from the sword; and they were servants to him and to his sons until the kingdom of Persia was established there,
which Nebuchadnezzar king of Babylon did not take when he carried Jeconiah the son of Jehoiakim, king of Judah, into exile from Jerusalem to Babylon, along with all the nobles of Judah and Jerusalem.
Then Nebuzaradan the [chief executioner and] captain of the bodyguard took the rest of the people who remained in the city, along with those who had deserted and surrendered to him, and the rest of the [so-called better class of] people who were left and carried them into exile in Babylon.
The Lord gave Jehoiakim king of Judah into his hand, along with some of the articles of the house of God; and he brought them into the land of Shinar, to the house of his god, and brought the articles into the treasury of his god. [2 Chr 36:5-7; Jer 27:19, 20; Dan 5:1-3]
So all the generations from Abraham to David are fourteen; from David to the Babylonian deportation (exile), fourteen generations; and from the Babylonian deportation to the Messiah, fourteen generations.