Jeremiah 40:5

Now while he was not yet gone back, he said, Go back also to Gedaliah the son of Ahikam the son of Shaphan, whom the king of Babylon hath made governor over the cities of Judah, and dwell with him among the people: or go wheresoever it seemeth convenient unto thee to go. So the captain of the guard gave him victuals and a reward, and let him go.

After his release Jeremiah was left free to go wherever he wished. He chose to remain in the land with the poor remnant left in Judah rather than depart from it. There he dwelt under Gedaliah, whom the king of Babylon had appointed governor over the cities of Judah. The captain of the guard furnished him with provisions and a reward and then let him go.