God always listens to prayers. That does not mean, however, that He is always going to answer them or necessarily be pleased that the person is praying. In Jeremiah 14, God had already made up His mind that He was going to punish Israel for their sins. He told Jeremiah not even to bother praying for the people. Furthermore, He told the cries of the people.
In that situation, it wasn’t a case of God not listening to the peoples prayers for mercy and deliverance. Rather, the prayers were irrelevant because the people were sinning greatly and only began praying when judgment fell on them. As far as God was concerned, they might as well have saved their breath.
JEREMIAH 14:11-12 – 11 Then said the Lord unto me, Pray not for this people for their good.
12 When they fast, I will not hear their cry; and when they offer burnt offering and an oblation, I will not accept them: but I will consume them by the sword, and by the famine, and by the pestilence.