Ezekiel on Egypt's 40 year desolation Does anyone have any more knowledge regarding Ezekiel's prophecy about Egypt becoming desolate for 40 years?
I know that Nebuchadnezzar ransacked much of Egypt and carried away booty as Ezekiel had stated, as well as the Egyptians being taken as captives by Nebuchadnezzar.
We know that Cyrus the Great deported the captives back to their original countries including Egypt, as what Ezekiel said; and that after the Egyptians returned Egypt became a lowly kingdom, as what Ezekiel had said.  

Does anyone know how long the time span between Nebuchadnezzar taking the Egyptians as slaves to Cyrus releasing the Egyptians?  Was this 40 years, or a different time span?
I have found secular history's time lines to be problematic in several areas. But there is enough information to be able to rely upon the prophesy of the 40 year desolation of Egypt.
Adam Clarke's commentary on Ezekiel chap. 29 indicates a 40 year time span from the taking by Nebuchadnezzar to the release under Cyrus.
Introduction Chap. 29,

&quot;and God is introduced denouncing, in plain terns, the most awful judgments against him and his nation, and declaring that the Egyptians should be subjected to the Babylonians till the fall of the Chaldean empire, Ezekiel 29:8-12. The prophet then foretells that Egypt, which was about to be devastated by the Babylonians, and many of the people carried into captivity, should again become a kingdom; but that it should never regain its ancient political importance; for, in the lapse of time, it should be even the Basest of the kingdoms, a circumstance in the prophecy most literally fulfilled, especially under the Christian dispensation, in its government by the Mameluke slaves, Ezekiel 29:13-16. The prophecy, beginning at the seventeenth verse, is connected with the foregoing, as it relates to the same subject, though delivered about seventeen years later. Nebuchadnezzar and his army, after the long siege of Tyre, which made every head bald by constantly wearing their helmets, and wore the skin of off every shoulder by carrying burdens to raise the fortifications, were disappointed of the spoil which they expected, by the retiring of the inhabitants to Carthage. God, therefore, promises him Egypt for his reward, Ezekiel 29:17-20. The chapter concludes with a prediction of the return of the Jews from the Babylonish captivity, Ezekiel 29:21.&quot;

Clarke's Commentary on verse 13,

&quot;Will I gather the Egyptians - It is probable that Cyrus gave permission to the Egyptians brought to Babylon by Nebuchadnezzar, to return to their own country. And if we reckon from the commencement of the war against Pharaoh-hophra by Nebuchadnezzar, to the third or fourth year of Cyrus, the term will be about forty years.&quot;  Source: here.

Gill's Exposition on verse 13,

&quot;Yet thus saith the Lord God, at the end of forty years,.... Reckoning from its devastation by Nebuchadnezzar to the taking of Babylon by Cyrus:
will I gather the Egyptians from the people whither they were scattered; from Babylon, and other places; Cyrus very probably being stirred up by the Lord to proclaim liberty to the Egyptians, as he did to the Jews, to return to their own land; and at the same time restored Amasis to the quiet possession of his kingdom, who must be still alive; since, according to Diodorus Siculus (w), he reigned fifty five years; though, according to Herodotus (x), he reigned but forty four years. &quot;  Source: here.

Egypt's desolation was also prophesied by Jeremiah in chap. 46.
The indication by many commentators is that when Babylon fell to Cyrus, then Cyrus gave the Egyptians their freedom. But, determining the years from secular historical records is problematic.
Historians place the fall of Babylon about 539 BC.  This would put the fall of Egypt 40 years earlier in 579 BC.  This does not comport with the secular records of Nebuchadnezzar's invasion of Egypt in 568 BC.  The secular records are off.
Excerpt from Keil and Delitzsh OT Commentary on Verses 17-18,
The contents of the prophecy, namely, the assurance that God would give Egypt to Nebuchadnezzar as spoil in return for the hard labour which he and his army had performed at Tyre, point to the time immediately following the termination of the thirteen years' siege of Tyre by Nebuchadnezzar. If we compare with this the date given in Ezekiel 29:17, the siege was brought to a close in the twenty-seventh year of the captivity of Jehoiachin, i.e., b.c. 572, and must therefore have commenced in the year b.c. 586, or about two years after the destruction of Jerusalem, and with this the extract given by Josephus (c. Ap. i. 21) from the Tyrian annals agrees.&quot;  Source: here.
As another source places the Nebuchadnezzar's invasion of Egypt in 588 BC, with the end of their desolation in 548 BC.  And, that would mean that the fall of Babylon to Cyrus was about 9 years earlier than secular history records it.  See the info at &quot;Jerusalem 607 BCE&quot; here.