In 40:744:30 we are given the history of the remnant of Judah from Gedaliah to Johanan.
Jeremiah 40:7-12 describes the gathering of the remnant of Judah to Gedaliah.
When all the leaders of the forces in the field heard that the king of Babylon had appointed Gedaliah over the land and had committed to him all the poor of the land who had not been exiled to Babylon, they came to Gedaliah at Mizpah (vv. 7-8). Gedaliah swore to them, saying, "Do not be afraid to serve the Chaldeans; remain in the land and serve the king of Babylon, and it will be well with you" (v. 9). Then he said that he would dwell in Mizpah to stand before the Chaldeans who came to them, but they, the remnant of Judah, should gather wine, summer fruit, and oil and put them in their holds and dwell in the cities which they had taken (v. 10).
All the Jews who were in Moab and among the children of Ammon and in Edom and who were in all the lands also heard that the king of Babylon had left a remnant of Judah and had appointed over them Gedaliah. All of them returned from all the places to which they had been driven and came to Gedaliah at Mizpah in the land of Judah (vv. 11-12).
Jeremiah 40:1341:10 tells about the murder of Gedaliah.
Johanan and all the leaders of the forces who were in the field came to Gedaliah and told him that Baalis the king of Ammon had sent Ishmael to take his life. However, Gedaliah would not believe them (vv. 13-14). Then Johanan said secretly to Gedaliah that he would go and strike Ishmael so that Ishmael would not take Gedaliah's life. Johanan said, "Why should he take your life, and all the Jews who are gathered to you be scattered and the remnant of Judah perish?" (v. 15). But Gedaliah would not let Johanan do it, for he said that Johanan was speaking falsehood concerning Ishmael (v. 16).