Jeremiah 42:6
Whether it be good, or whether it be evil, we will obey the voice of the LORD our God, to whom we send thee; that it may be well with us, when we obey the voice of the LORD our God. Whether it be good, or whether it be evil, we will obey the voice of the LORD our God, to whom we send thee; that it may be well with us, when we obey the voice of the LORD our God.
It is the people's promise to obey the voice of the Lord their God whether it be good or evil — whether it seemed good or bad to them, or brought good or hardship — trusting that it would be well with them when they obeyed. It was made by the remnant leaders, the Jews left in the land after Zedekiah's captivity, when they asked Jeremiah to seek God's guidance and pledged to obey whatever message God gave through him so that things might go well for them.
It belongs to the history of the two years before Jerusalem's fall. The book's chapters are not always chronologically arranged, with some material from Zedekiah's reign placed before material from Jehoiakim's reign, and up to chapter 20 the order is fairly chronological. From chapter 20 to 46 the time order runs 20, 22, 23, 25, 26, 35, 36, 45, 24, 29, 30, 31, 27, 28, 21, 34, 37, 32, 33, 38, 39:15-18, 39:1-14, 40, 41, 42, 43, 44, 46, placing chapter 42 after chapters 40 and 41 and before chapters 43 and 44.
They made the promise with their hearts already set on going to Egypt, wanting only advice in harmony with their own wishes and purposes. Those who made it were unable to discern between right and wrong, and Jeremiah through discernment by the Spirit laid bare the secrets of their hearts. The Lord's instruction against going to Egypt tested whether the promise was sincere, and their later refusal to accept and follow that direction exposed that it was insincere and worthless; they said they would obey but did not mean it.
Instead of obeying by remaining in the land under the protection of the king of Babylon, who highly esteemed Jeremiah, they disobeyed and departed for Egypt against Jeremiah's instruction, accusing Jeremiah of being influenced by Baruch. In Egypt many fell into idolatry, God punished them for their sin, and Jeremiah foretold the futility of their course by prophesying Egypt's defeat and the very place in Egypt's capital where Nebuchadnezzar would set his standard.