I found this Seforno:
וַיִּחַר אַף ה' בָּם. שֶׁלּא נִכְנְעוּ תֵּיכֶף כְּמו שֶׁעָשָה דָּוִד בְּאָמְרו אֶל נָתָן "חָטָאתִי"
The anger of Hashem that the pasuk is referring to is not a result of what Miriam said – that was already addressed by G-d’s rebuke. The anger of Hashem is a result of Miriam’s lack of reaction to that rebuke. When Nasan came and told David that he had done something wrong, David immediately responded, “Chatasi,” with an admission of guilt. The Torah does not record a similar reaction on the part of Miriam and Aharon. It’s not what they said that kindled Hashem’s anger, but rather it was the lack of immediate contrition once they knew they had done wrong.