This prophecy is rooted in the old covenant promises of restoration to land after the blessings and curses had been poured out.
Deuteronomy 30:1-5 When all these things come upon you—the blessings and curses I have set before you—and you call them to mind in all the nations to which the LORD your God has banished you, and when you and your children return to the LORD your God and obey His voice with all your heart and all your soul according to everything I am giving you today, then He will restore you from captivity and have compassion on you and gather you from all the nations to which the LORD your God has scattered you. Even if you have been banished to the ends of the earth, He will gather you and return you from there.
Daniel confirms the curses of the law were poured out:
Daniel 9:11 All Israel has transgressed Your law and turned away, refusing to obey Your voice; so the oath and the curse written in the Law of Moses, the servant of God, has been poured out on us because we have sinned against You.
Jeremiah confirms that the promise of restoration, found in the law of moses, would be fulfilled after the Babylonian exile.
Jeremiah 29:10-14 For this is what the LORD says: “When Babylon’s seventy years are complete, I will attend to you and confirm My promise to restore you to this place. For I know the plans I have for you, declares the LORD, plans to prosper you and not to harm you, to give you a future and a hope. Then you will call upon Me and come and pray to Me, and I will listen to you. You will seek Me and find Me when you search for Me with all your heart. I will be found by you, declares the LORD, and I will restore you from captivity and gather you from all the nations and places to which I have banished you, declares the LORD. I will restore you to the place from which I sent you into exile.
Ezekiel prophesied DURING the Babylonian exile, that God would gather the Israelites back to the land.
Ezekiel 37:21 you are to tell them that this is what the Lord GOD says: ‘I will take the Israelites out of the nations to which they have gone, and I will gather them from all around and bring them into their own land.
Ezra confirms that the Israelites returned in waves back to the land after the Babylonian exile
Ezra 1:5 So the family heads of Judah and Benjamin, along with the priests and Levites—everyone whose spirit God had stirred—prepared to go up and rebuild the house of the LORD in Jerusalem.
Ezra 8:1 These are the family heads and genealogical records of those who returned with me from Babylon during the reign of King Artaxerxes
Chronicles confirms that some from the northern tribes resettled in the land after the Babylonian exile.
1 chronicles 9:1-3 So all Israel was recorded in the genealogies written in the Book of the Kings of Israel. But Judah was exiled to Babylon because of their unfaithfulness. Now the first to resettle their own property in their cities were Israelites, priests, Levites, and temple servants. These were some of the descendants of Judah, Benjamin, Ephraim, and Manasseh who lived in Jerusalem:
Thus, under the OLD COVENANT, Israel did return to the land as promised.
However.....
The old covenant is now obsolete, and the new covenant has superseded the old covenant.
Hebrews 10:9 Then He adds, “Here I am, I have come to do Your will.” He takes away the first to establish the second
Hebrews 8:13 By speaking of a new covenant, He has made the first one obsolete; and what is obsolete and aging will soon disappear.
Therefore, as the old covenant is now obsolete, its promises of restoration are now obsolete.