This 20th chapter records the deep depression of Jeremiah, and it wasn't the only occasion he would be overcome with a depression – such was the hostility against him. At his call at the very beginning, the promises of God had been so powerful.
He heard that Jeremiah prophesied these things. There is some debate about what this means: whether this places the event quite early in the preaching of Jeremiah so the chief priests have only recently become aware of the scale of Jeremiah's work and the number of people paying attention to him; or whether this is the first point at which Jeremiah begins to proclaim in the open air and in the gates of the city, the places which God had previously sent him to. It may be that this is the first time he has actually proclaimed these things in the temple, right inside the house of God in one of its courts, and Pashur, who was the governor in effect of the house, was enraged and decided he was going to put a stop to it and immediately took action.