Jeremiah is talking about them returning to their land after seventy years of captivity. This prophesy was fulfilled when Jerusalem was restored and the second Temple that had been destroyed was rebuilt.
Jeremiah 30:7-11 KJV
7) Alas! for that day is great, so that none is like it: it is even the time of Jacob's trouble; but he shall be saved out of it.
8) For it shall come to pass in that day, saith the LORD of hosts, that I will break his yoke from off thy neck, and will burst thy bonds, and strangers shall no more serve themselves of him:
9) But they shall serve the LORD their God, and David their king, whom I will raise up unto them.
10) Therefore fear thou not, O my servant Jacob, saith the LORD; neither be dismayed, O Israel: for, lo, I will save thee from afar, and thy seed from the land of their captivity; and Jacob shall return, and shall be in rest, and be quiet, and none shall make him afraid.
11) For I am with thee, saith the LORD, to save thee: though I make a full end of all nations whither I have scattered thee, yet will I not make a full end of thee: but I will correct thee in measure, and will not leave thee altogether unpunished.
To be driven out yet again? Or to return, to be in rest, and quite, and without any to make them fearful?
Ezekiel 39:25-29 KJV
25) Therefore thus saith the Lord GOD; Now will I bring again the captivity of Jacob, and have mercy upon the whole house of Israel, and will be jealous for my holy name;
26) After that they have borne their shame, and all their trespasses whereby they have trespassed against me, when they dwelt safely in their land, and none made them afraid.
27) When I have brought them again from the people, and gathered them out of their enemies' lands, and am sanctified in them in the sight of many nations;
28) Then shall they know that I am the LORD their God, which caused them to be led into captivity among the heathen: but I have gathered them unto their own land, and have left none of them any more there.
29) Neither will I hide my face any more from them: for I have poured out my spirit upon the house of Israel, saith the Lord GOD.
Do you see the same thing here?
Much love!