And this whole land shall be a desolation, and an astonishment; and these nations shall serve the king of Babylon seventy years. Jeremiah 25:11
Thus saith the LORD, That after seventy years be accomplished at Babylon I will visit you, and perform my good word toward you, in causing you to return to this place. Jeremiah 29:10
When you are come into Babylon, you shall be there many years, and for a long time, even to seven generations. Baruch 6:2
It turns out that neither of these answers is correct.
The Babylonian captivity ended in 539 BCE when King Cyrus of Persia defeated Babylon. But when it began in somewhat less clear. Was it 605 BCE after the Battle of Carchemish, when Nebuchadnezzar II attacked Jerusalem; or 598/7 BCE when Jehoiakim was killed and the his successor Jeconiah and many others were taken to Babylon; or 587/6 BCE when the temple and Jerusalem were destroyed and many of its people were exiled?
Depending on which of these dates you choose as the start of the Babylonian Captivity, its duration would be 66, 59, or 48 years, respectively -- not 70 years or seven generations.