The Rambam famously states regarding the nature of positive prophecies (Hilchot Yesodei HaTorah 10:4):
דברי הפורענות שהנביא אומר כגון שיאמר פלוני ימות או שנה פלונית רעב או מלחמה וכיוצא בדברים אלו אם לא עמדו דבריו אין בזה הכחשה לנבואתו ואין אומרים הנה דבר ולא בא... אבל אם הבטיח על טובה ואמר שיהיה כך וכך ולא באה הטובה שאמר בידוע שהוא נביא שקר שכל דבר טובה שיגזור האל אפילו על תנאי אינו חוזר ולא מצינו שחזר בדבר טובה אלא בחרבן ראשון כשהבטיח לצדיקים שלא ימותו עם הרשעים וחזר בדבריו וזה מפורש במסכת שבת.
[Regarding] prophecies of retribution which a prophet will utter - e.g., "So and so will die," "This or that year will be a year of famine or a year of war," and the like. If his words do not come true, this does not nullify the validity of his prophecy, nor do we say [in condemnation of him]: "Behold, he spoke and his words were not fulfilled."...
... But if [a prophet] promised that good would come and such and such will occur, and the good about which he prophesied did not materialize, he is surely a false prophet. Any good which God decrees - even if [the decree] is provisional - will never be nullified. We only find [God] nullifying a positive prophecy during the destruction of the first Temple. He had promised the righteous that they would not die together with the wicked; however, He nullified this prophecy, as explained in the tractate of Shabbat. (Translation from Chabad with minor edits).
This view has become mainstream; for example, here is an excerpt from Chabad.org's What is Prophecy?:
[O]nce a Divine promise of good is communicated through a prophet it is never retracted; however, if the prophet warns, in the name of G‑d, that a calamity is destined to befall, and it does not occur, this does not disprove his prophecy, since a decree of evil can be removed through prayer and repentance.
However, Yirmiyahu 18:5-10 states:
ה וַיְהִי דְבַר-יְהוָה, אֵלַי לֵאמוֹר. ו הֲכַיּוֹצֵר הַזֶּה לֹא-אוּכַל לַעֲשׂוֹת לָכֶם, בֵּית יִשְׂרָאֵל--נְאֻם-יְהוָה; הִנֵּה כַחֹמֶר בְּיַד הַיּוֹצֵר, כֵּן-אַתֶּם בְּיָדִי בֵּית יִשְׂרָאֵל. {ס} ז רֶגַע אֲדַבֵּר, עַל-גּוֹי וְעַל-מַמְלָכָה, לִנְתוֹשׁ וְלִנְתוֹץ, וּלְהַאֲבִיד. ח וְשָׁב, הַגּוֹי הַהוּא, מֵרָעָתוֹ, אֲשֶׁר דִּבַּרְתִּי עָלָיו--וְנִחַמְתִּי, עַל-הָרָעָה, אֲשֶׁר חָשַׁבְתִּי, לַעֲשׂוֹת לוֹ. {ס} ט וְרֶגַע אֲדַבֵּר, עַל-גּוֹי וְעַל-מַמְלָכָה, לִבְנוֹת, וְלִנְטוֹעַ. י וְעָשָׂה הרעה (הָרַע) בְּעֵינַי, לְבִלְתִּי שְׁמֹעַ בְּקוֹלִי--וְנִחַמְתִּי, עַל-הַטּוֹבָה, אֲשֶׁר אָמַרְתִּי, לְהֵיטִיב אוֹתוֹ.
5 Then the word of the LORD came to me, saying: 6 'O house of Israel, cannot I do with you as this potter? saith the LORD. Behold, as the clay in the potter's hand, so are ye in My hand, O house of Israel. {S} 7 At one instant I may speak concerning a nation, and concerning a kingdom, to pluck up and to break down and to destroy it; 8 but if that nation turn from their evil, because of which I have spoken against it, I repent of the evil that I thought to do unto it. {S} 9 And at one instant I may speak concerning a nation, and concerning a kingdom, to build and to plant it; 10 but if it do evil in My sight, that it hearken not to My voice, then I repent of the good, wherewith I said I would benefit it.
The Rambam surely knew Yirmiyahu, and therefore how could he hold his opinion that prophecies of good could not be revoked? Is this truly a contradiction, as it clearly seems to be? And, practically, should we stop teaching this Rambam in our Chinuch institutions?