It didn't matter if he came all that way. He chooses whether or not to participate in at that gym. If he doesn't like the way the Gym Leader handles their business then he can go elsewhere.Ash came all that way for a gym battle. There was no way he was turning back and it's a good thing he got Sklya to battle him because Ash proved he is a stronger trainer and deserved the badge. I'm glad Ash taught Skyla a lesson. Skyla was getting too arrogant thinking she knew everything about battling and that she could beat Ash but she ended up being wrong because Ash proved to her he was the stronger battler.
An air battle is a battle in Skyla's mind where she relies on the opponents current party to determine who has the advantage in battle. If the trainer has an advantage then she hands the person a badge.I don't think you understand what an air battle is.
It seems that you misunderstand what air battles are.Yes, you are right that Skyla looks at the pokemon in front of her but as it was said in the last episode (Cilan takes Flight) Skyla infact imagines the entire battle in her head to discover an outcome (the illustrations are just a visual representation of her thoughts for our benefit). Now, if Skyla is predicting the entire battle, she has to consider all outcomes and Tranquil's evolution was never a thought in her head and therefore her imagination of the battle in her head was wrong and her Air battles are not always successful.