I think it's fair to say that most, if not all people, desire to experience good national leadership during the course of their lifetime. Jeremiah's life spanned the reign of multiple kings of Judah, but the events spoken of in Chapter 7 took place during the reign of a godly king. For a time, Josiah reigned as king in Judah. His reign began when he was eight, but when he was sixteen, he became a fully devoted follower of the Lord. In his 20's, he sought to eradicate idols from the land. He also ordered the remodeling of the temple. In the process of remodeling, the books of the Old Testament Law were rediscovered and Josiah encouraged the people to begin obeying the Lord's teaching again.
2 Chronicles 35 tells us about the completion of the work on the temple and the celebration of the Passover that took place at that time. The people were excited, and in a very celebratory mood. From all outside appearances, it would have seemed like a great revival was taking place among the people and that a renewed interest in walking with the Lord was taking place on a large scale. But the Lord knows people's hearts. He knows when we're faking. He knows when we're trying to craft an image that's the opposite of what's taking place in our hearts. It was into this context that the Lord spoke through Jeremiah to address the distant hearts of the people of Judah that were being disguised by their outward display.