John Gill's Exposition of the Whole Bible
Jeremiah 40:5
Now while he was not yet gone back, [he said], go back also to Gedaliah,.... These words, by different versions, are made difficult to be understood, both, whose words they are, and of whom they are spoken. Jarchi makes them to be words of God, and the sense this,
"and by all this he (Jeremiah) had no mind to return; and God said to him, go back to Gedaliah.''
According to the Targum, they are the words of Nebuzaradan, which paraphrases them thus;
"if thou wilt not return (that is, with him to Babylon, or rather to Jerusalem, or best to his own native place), or if thou wilt not dwell (that is, in this place), go back to Gedaliah.''
But of whom they are spoken interpreters differ. Some say of Zedekiah, as Cocceius; while he (Zedekiah) does not return, that is, to Jerusalem; which possibly he might, though as yet not determined by the king of Babylon; in the mean while is bid to go to Gedaliah, appointed governor. Others of Gedaliah, thus, while he (Gedaliah) does not return, but stays at Mizpah, go to him thither. Though it seems best to understand it of Jeremiah, who, having had leave from the captain, did not immediately set out anywhere; but, seething to be at a loss which way to go, Nebuzaradan gives him his advice; that seeing he did not care to go to Babylon, that he would go to Gedaliah
the son of, Ahikam the son of Shaphan, whom the king of Babylon had made governor over all the cities of Judah, and dwell with him among the people; this was one of the princes of Judah, who, during the siege, went over to the Chaldeans, and who was in great esteem with them; and being, no doubt, recommended to the king of Babylon by his generals, he made him governor of the land under him:
or go wherever it seemeth convenient unto thee to go; though he gave him his advice, he did not press it, but left him at full liberty to take his own way, and go into what part of the land he pleased, and settle in it:
so the captain of the guard gave him victuals, and a reward, and let him go; the prophet was just come out of prison, and destitute of the necessaries of life, and the land was laid waste by the enemy; and therefore he could not have subsisted without a supply, which was liberally given by the captain; not only food for present refreshment, and sufficient for his journey, which way soever he took, but a present of money or clothes, or both; which was very kind usage of a prophet by a Heathen officer.