According to Ramba"m Hilchot Kiddush Hachodesh 1:1 and 1:2, Devarim 16:1 is the source. But what Rash"i states is a bit "incomplete". True, the "goal" is that Pesach does have to be in the month of Aviv (the ripening of the barley crop, or colloquially, "Spring".) But, it is actually because of the deficit of 11 days each year between the lunar and solar calendar an extra month is needed every so often.
I'll excerpt relevant parts from Ramba"m:
חדשי השנה הם חדשי הלבנה
והשנים שאנו מחשבין הם שני החמה שנאמר שמור את חדש האביב
וכמה יתרה שנת החמה על שנת הלבנה קרוב מאחד עשר יום. לפיכך כשיתקבץ מן
התוספת הזאת כמו שלשים יום או פחות מעט או יותר מעט מוסיפין חדש אחד
ועושין אותה השנה שלשה עשר חדש והיא הנקראת שנה מעוברת
A more thorough reading of the next few chapters in Ramba"m reveals that the intercalation was primarily because of Aviv (ripening of the barley.) I.e., it wasn't per se that Pesach directly forced the extra month, but moreso that the barley had to be available for the Omer offering to be brought on the 16th of Nissan, or the 2nd day of Pesach.
However, Pesach did have a role in that it was a Pilgrimage holiday and people had to get to Jerusalem from various parts of Israel. Thus, if heavy rains washed out the roads and bridges, Bet Din could decide to declare a leap year so there would be an extra month to make repairs.
Re Rashi's statement on Vayikra 23:39, I can see why anyone would interpret this as being the "source". But, logically, the one in Devarim makes more sense. If the 1st month of the year is not in its correct season, then how can the 7th month be that way? That would work if Succot were the only seasonal requirement. Then, one could argue that the extra month might need to be placed after the 6th month instead of before the 1st.