Some say Aharon was punished. Others say that because Aharon wasn't the instigator here, Hashem merely got angry at him, but didn't punish him.
Verse 9 says:
וַיִּֽחַר אַ֧ף יְהוָ֛ה בָּ֖ם וַיֵּלַֽךְ׃
Still incensed with them, the LORD departed.
Emphasis on the word בם, them, in the plural.
ויחר אף ה׳ בם: איכא מ״ד מלמד שאף אהרן נצטרע ואיכא מאן דאמר שהוא בנזיפה בעלמא פר׳ הזורק.
"and the anger of Hashem was kindled against them;” according to some commentators Aaron was also smitten with tzoraat;” (to account for the word: בם, “against them”) Another sage holds that G-d contented Himself with being angry at Aaron without taking any action against him. (Compare Talmud in tractate Shabbat folio 97)
Follow the reference to Shabbat 97, where we see that this was R' Akiva's opinion. In Bamidbar 12:10 Aharon "turned", and the Gemara there explains that he too had tzaraat.
כיוצא בדבר אתה אומר (במדבר יב, ט) ויחר אף ה' בם וילך מלמד שאף אהרן נצטרע דברי רבי עקיבא אמר לו רבי יהודה בן בתירא עקיבא בין כך ובין כך אתה עתיד ליתן את הדין אם כדבריך התורה כסתו ואתה מגלה אותו ואם לאו אתה מוציא לעז על אותו צדיק
On a similar note, Rabbi Akiva revealed an additional matter not explicitly articulated in the Torah. You say that when Aaron and Miriam spoke against Moses, both Aaron and Miriam were struck with leprosy, as it written: “And God became angry at them and He left, and the cloud departed from above the tent, and behold, Miriam was leprous like snow. And Aaron turned toward Miriam, and behold, she was leprous” (Numbers 12:9–10). The verse’s statement that God became angry at both of them teaches that Aaron, too, became leprous; this is the statement of Rabbi Akiva. Rabbi Yehuda ben Beteira said to him: Akiva, in either case you will be judged in the future for this teaching. If the truth is in accordance with your statement, the Torah concealed Aaron’s punishment and you reveal it. And if the truth is not in accordance with your statement, you are unjustly slandering that righteous man.
ואלא הכתיב בם ההוא בנזיפה בעלמא תניא כמאן דאמר אף אהרן נצטרע דכתיב (במדבר יב, י) ויפן אהרן אל מרים והנה מצורעת תנא שפנה מצרעתו
The Gemara asks: However, didn’t Rabbi Akiva derive this from the plural pronoun them, meaning that God was angry with both of them? The Gemara answers: God’s anger in that verse was manifest in a mere rebuke, not in leprosy. A baraita was taught in accordance with the opinion of Rabbi Akiva, who said that Aaron also became leprous, as it is written: “And Aaron turned toward Miriam, and behold, she was leprous” (Numbers 12:10), and it was taught: This teaches that he turned, i.e., he was healed, from his leprosy, as he too had been afflicted.
All quotes including translations from Sefaria.