Rashi in Devarim 24:9 quotes Sifrei:
זכור את אשר עשה ה' אלהיך למרים. אִם בָּאתָ לְהִזָּהֵר שֶׁלֹּא תִלְקֶה בְּצָרַעַת אַל תְּסַפֵּר לְשׁוֹן הָרָע, זָכוֹר הֶעָשׂוּי לְמִרְיָם שֶׁדִּבְּרָה בְאָחִיהָ וְלָקְתָה בִנְגָעִים (עי' ספרי)׃
זכור את אשר עשה ה' אלהיך למרים REMEMBER WHAT THE LORD THY GOD DID UNTO MIRIAM — if you wish to guard yourself against being stricken with leprosy, do not speak slander! Remember what was done unto Miriam who spoke slander against her brother and was stricken with a leprous plague! (cf. Sifrei Devarim 275:1).
The Sifrei (followed by many others, Rambam, Ramban, Chinuch, Rabenu Bachyeh, all the way through the chafetz Chaim), uses this passuk as a prohibition against speaking Lashon Harah.
The text of the Passuk itself only warns us to remember WHAT Hashem did to Miriam. This would be the tzara'as, the leprosy, which Hashem punished her with. The pasuk does not say that we must remember WHY she was punished with leprosy. So how then, would this be a source to forbid speaking lashon hora?