Bible Notes Online - Jeremiah 40 - ESV
Commentary

v1-3: For some reason, Jeremiah ended up with the captives being taken to Babylon, when he should have been with Gedaliah in Jerusalem.

'There was bitter wailing at parting from those left behind, and in weary prospect of hopeless bondage, and still bitterer lamentation, as in the sight of friends, relations, and countrymen, the old and the sick; the weakly, and women and children were piteously slaughtered, not to encumber the conqueror's homeward march,' (Dr Alfred Edersheim Sketches of Jewish Social Life)

The real reason for Jerusalem’s defeat was spiritual, not military; even the Babylonian captain realised that Jeremiah’s words had been fulfilled. In 39.11-14, Nebuchadnezzar himself had given orders about the treatment of Jeremiah. It seems his words had been heard far beyond the Jewish people in Judah. It may have been that those who had defected to Nebuchadnezzar had spoken of his command to surrender (21.9; 29.4-9), or that those captured earlier had testified of his words.

v4-6: Nebuzaradan, the Babylonian captain, showed kindness to Jeremiah, and granted him a measure of freedom. Jeremiah’s immediate future was with the poor of Judah (39.10).

v7-10: Gedaliah was appointed as governor over the poor people left in the land. His words to those army officers who joined him echoed Jeremiah’s words; the best option was to stay and to serve the king of Babylon.

v11-12: It seems many Jews who had previously fled now returned.

v13-16: Very quickly divisions appeared in the small Jewish community. Gedaliah had urged a peaceful co-existence with Babylon, but others wanted to fight on. They perhaps viewed Gedaliah as an agent of Babylon and therefore a traitor to Judah and Israel.

Johanan had heard of the plot to kill Gedaliah, but Gedaliah didn’t believe it. Further, he did not approve of Johanan’s scheming.