Jeremiah 1:2–3 (ESV)

2 to whom the word of the LORD came in the days of Josiah the son of Amon, king of Judah, in the thirteenth year of his reign.

Jeremiah acted in the time of the last kings of Judah, from Josiah to Zedekiah. Even though Josiah was still a pious king, the apostasy from God among the people was so great that God irrevocably carried his people into captivity. During this period, the great power of Assyria was succeeded by the world empire of Babel. Egypt also played an important role during this period, until their army was crushed by the Babylonians in 605 BC. In 587 BC, after a rebellion by the last king, King Zedekiah, Jerusalem was besieged and taken by the Babylonians, and the temple was destroyed. Many Judeans were taken into exile to Babylon.