Jeremiah, Ezekiel, and Daniel

Chronology
The entire period from king Josiah to the destruction of Jerusalem is a little over 50 years. Five kings reigned during this period. Josiah was slain by Pharaoh-nechoh and the people made his son king, Jehoahaz (also known as Shallum) (2 Kings 23:29-3029In his days Pharaoh-nechoh king of Egypt went up against the king of Assyria to the river Euphrates: and king Josiah went against him; and he slew him at Megiddo, when he had seen him. 30And his servants carried him in a chariot dead from Megiddo, and brought him to Jerusalem, and buried him in his own sepulchre. And the people of the land took Jehoahaz the son of Josiah, and anointed him, and made him king in his father's stead. (2 Kings 23:29‑30)). Jehoahaz was taken captive by Pharaoh-nechoh who made Jehoiakim (Eliakim), another son of Josiah, king in his stead (2 Kings 23:33, 3433And Pharaoh-nechoh put him in bands at Riblah in the land of Hamath, that he might not reign in Jerusalem; and put the land to a tribute of an hundred talents of silver, and a talent of gold. 34And Pharaoh-nechoh made Eliakim the son of Josiah king in the room of Josiah his father, and turned his name to Jehoiakim, and took Jehoahaz away: and he came to Egypt, and died there. (2 Kings 23:33‑34)). Jehoiakim ended his reign as a vassal of the king of Babylon (2 Kings 24:11In his days Nebuchadnezzar king of Babylon came up, and Jehoiakim became his servant three years: then he turned and rebelled against him. (2 Kings 24:1)). Daniel was a captive during this time (Dan. 1:11In the third year of the reign of Jehoiakim king of Judah came Nebuchadnezzar king of Babylon unto Jerusalem, and besieged it. (Daniel 1:1)).
Jehoiachin (Jechoniah, Coniah), a grandson of Josiah and the son of Jehoiakim, became the fourth king. Jehoiachin was taken captive by Nebuchadnezzar king of Babylon along with the able-bodied men of the land (2 Kings 24:15, 1615And he carried away Jehoiachin to Babylon, and the king's mother, and the king's wives, and his officers, and the mighty of the land, those carried he into captivity from Jerusalem to Babylon. 16And all the men of might, even seven thousand, and craftsmen and smiths a thousand, all that were strong and apt for war, even them the king of Babylon brought captive to Babylon. (2 Kings 24:15‑16)). Ezekiel was included amongst their number (Ezek. 1:22In the fifth day of the month, which was the fifth year of king Jehoiachin's captivity, (Ezekiel 1:2)). Zedekiah (Mattaniah), a third son of Josiah, and the last king of Judah, was made king by Nebuchadnezzar and taken captive by him (2 Kings 24:17, 25:7).
Zedekiah’s reign was replaced with the governorship of Gedaliah, whom Ishmael (of royal descent) murdered (2 Kings 25:2525But it came to pass in the seventh month, that Ishmael the son of Nethaniah, the son of Elishama, of the seed royal, came, and ten men with him, and smote Gedaliah, that he died, and the Jews and the Chaldees that were with him at Mizpah. (2 Kings 25:25)). Only Josiah and Jechoniah are mentioned in the genealogy of Matthew.
It was a time of profound change during which God was setting aside Israel and placing His government in the hands of a Gentile nation. Recognizing this is key to understanding these books.