The word that came to Jeremiah from Jehovah, after that Nebuzar-adan the captain of the body-guard had let him go from Ramah, when he had taken him, being bound in chains, among all the captivity of Jerusalem and Judah, that were carried away captive to Babylon.
And the captain of the body-guard took Jeremiah, and said unto him, Jehovah thy God pronounced this evil upon this place,
and Jehovah hath brought [it about] and done according as he said; for ye have sinned against Jehovah, and have not hearkened unto his voice, therefore this thing is come upon you.
And now, behold, I loose thee this day from the chains that are upon thy hand. If it seem good in thy sight to come with me to Babylon, come, and I will keep mine eye upon thee; but if it seem ill unto thee to come with me to Babylon, forbear. See, all the land is before thee: whither it seemeth good and right in thy sight to go, thither go.
And while he had not yet given answer; [he said,] Yea, go back to Gedaliah the son of Ahikam the son of Shaphan, whom the king of Babylon hath appointed over the cities of Judah, and abide with him in the midst of the people; or go wheresoever it seemeth right in thy sight to go. And the captain of the body-guard gave him provisions and a present, and let him go.
References for Jeremiah 40:5
And Jeremiah came unto Gedaliah the son of Ahikam to Mizpah, and abode with him among the people that remained in the land.
And all the captains of the forces that were in the fields, they and their men, heard that the king of Babylon had appointed Gedaliah the son of Ahikam over the land, and had committed unto him men, and women, and children, and of the poor of the land, of them that had not been carried away captive to Babylon.
References for Jeremiah 40:7