Ramban to Numbers 10:35 :
וקרא החטא "פורענות" אע"פ שלא אירע להם ממנו פורענות ושמא אלמלא חטאם זה היה מכניסם לארץ מיד
Chazal call the sin "punishment" even though no punishment occured, maybe because if not for this sin [Hashem] would have brought them into the land of Israel immediately
A friend pointed out to me the Rosh (ad. loc.) gives the following explanation:
י"ל כי הפורענות הא' הוא ויסעו מהר ה' כלו' מאחרי ה' כתינוק הבורח מבית הספר כך עשו ישראל אמרו שמא רוצה להרבות לנו תורה אחרת ומצוה אחרת מה עשו חזרו לאחוריהם שמנה מסעות והקב"ה נפרע מהם ומתו מהם הרבה וזהו הפורענו'
An explanation is the first punishment is [alluded to] in the verse "they journeyed from the Mountain of Hashem". Meaning, away from Hashem, like a child running away from school. Thus did the Jews, they said: "Maybe [Hashem] wants to add more Torah and more mitzvos". What did they do? They travelled back eight journeys, and Hashem paid them back and many of them died. This was the punishment.
Chasam Sofer (Derashos II p. 311b s.v. כתיב, Sefer HaZicharon p. 52) gives another approach. He writes that unlike other sins, where the punishment awaits for a later time, a person who neglects Torah study is in fact directly hurting himself. Therefore, the sin itself is the punishment (see there where he goes into detail about what this means). He invokes Avos 3:5 that says whoever removes the yoke of Torah from himself is given the yoke of malchus. He interprets this to mean immediately, and it refers to foreign invaders. He uses this to explain why specifically these two verses were used to create the interruption. He writes that Moshe sensed that the Jews were in danger due to their lack of desire to learn Torah, so he immediately prayed “let your enemies scatter, etc.”
Rav Shimon Schwab in Maayan Beis HaShoaiva also offers a different approach. He asks why did the Midrash compare the Jews to children running from school? Because children don't appreciate the significance of what they learn. That's why they run, they view it negatively, and only in adulthood do they appreciate what they were taught. So too the Jews, they didn't appreciate the Torah being taught to them. This is the punishment that the gemarra is referring to. Not to feel full satisfaction and enjoyment from spirituality, there’s no worse punishment than that.