That should fix it! If not, tell us and we'll try to find the problem. It's weird since most people are able to build the gym with no problem, but some can't and we can't replicate the issue, so that must be it.
Iono's main quest is finished, if you don't see a quest for her at level 40, contact us in e-mail or through Patreon DM and we can help you. You shouldn't see any message saying "Iono max level" at level 40!