The Sons of Josiah were the last Kings of Judah

Josiah was the last good king of Judah. He attempted to reform the religious life of the nation but the nation did not respond to the opportunity to purify their religion and at that point in history the nation became morally accountable which brought about YHWH's determination to discipline the nation for their idolatrous sins. Josiah, none the less was young and well loved by the nation. Judah stood between the rising power of Babylon and the waning power of Egypt. Pharaoh Necco determinined to check the power of Nebuchadnezzar and led his army to meet the Babylonians at Carchemish on the Euphrates which is at the extreme north of Palestine. His army was met by Josiah.

2 Chron 35:20After all this, when Josiah had prepared the temple, Necho king of Egypt came up to fight against Carchemish by Euphrates: and Josiah went out against him. 21But Necho sent ambassadors to him, saying, What have I to do with you king of Judah? I have not come against you this day, but against the house with which I have war: for God commanded me to hurry: forbear you from meddling with God, who is with me, so that he does not destroy you. 22But Josiah would not turn his face from him, but disguised himself, that he might fight with him and did not listen to the words of Necho from the mouth of God and came to fight in the valley of Megiddo. 23And the archers shot at king Josiah; and the king said to his servants, Have me away; for I am sore wounded. 24His servants therefore took him out of that chariot and put him in the second chariot that he had; and they brought him to Jerusalem and he died and was buried in one of the sepulchers of his fathers. And all Judah and Jerusalem mourned for Josiah. 25And Jeremiah lamented for Josiah: and all the singing men and the singing women spoke of Josiah in their lamentations to this day and made them an ordinance in Israel: and, behold, they are written in the lamentations.
The mourning was still a part of national life almost 100 years after the return from Babylonian captivity. It is mentioined in Zechariah contrasting the mourning for Josiah with the future mourning for the pierced Messiah.
Zec 12:11 In that day shall there be a great mourning in Jerusalem, as the mourning of Hadadrimmon in the valley of Megiddon

Necho was delayed by Josiah's attempt at battle which delayed the meeting at Carchemish. Necho retired to Egypt to reaquip his army and in the next year He was defeated but not killed at Carchemish. This let the fertile Crescent open to Babylonian expansion.

After the death of Josiah the people made his son Jehoahaz, also called Shallum, king in Josiah's place, however Pharaoh Necho who had defeated Josiah at Megiddo, came to Jerusalem and deposed him and made Judah tributary to Egypt. Jehoahaz was taken to Egypt where he later died. Necho then set his brother Eliakim on the throne, subject to Egypt, and changed his name to Jehoiakim. According to Jer 46:2 Necho was delayed by four years before he again made the journey to Carchemish and was defeated by Nebuchadnezzar in 606 BCE. He survived but returned to Egypt which left the fertile crescent open to Babylonian expansion. Nebuchadnezzar then conquered Jehoiakim in the third or fourth year of the Judean king's reign and took captive many of the royal family including Daniel and his friends. This was 606 BC and the Babylonian captivity of 70 years began with this event. Jehoiakim was taken to Babylon but later restored to the throne of David. Shortly after Jehoiakim rebelled against the Babylonians which made it necessary for Nebuchadnezzar to later reconquer the land. Jehoiakim lived a dissolute life and died in the 11th year of his reign. He was succeeded by his son Jehoiachin who was deposed by the arrival of the Babylonian army and after a three months siege was taken to Babylon for the rest of his life. This is the second stage of the cativity in 599 BC. Ezekiel among others went into captivity then. Nebuchadnezzar then took an oath in the name of YHWH from Jehoiakim's half brother, Zedekiah, also a son of Josiah. This eventful year begins Zedekiah's reign. But He broke his oath and by the fourth year of his reign rebelled and opted for independence from Babylon. Nebuchadnezzar came again to conquer this rebellious city in the ninth year of Zedekiah's reign. The siege lasted until the 11th year of his reign when the city walls were broken up in 585 BC and the rest of the inhabitants of the city were led to Babylon to captivity, including Zedekiah. Jeremiah was a prophet in Jerusalem all this period from the 13th year of Josiah until the 11th year of Zedekiah and the fall of Jerusalem. He would remain a prophet after the fall of Jerusalem and was forced to join the departure of some of the remnant which went to Egypt.