Highly depends on what result you want, here are a few methods but these had campaign missions in mind not melee matches also *I have not personally tested all of them so if something doesn't exactly work don't blame me for the results
1) Have the player and his opponent start on islands where the only way to attack eachother is through airship combat
2) Have the player and his opponent start on hills and again make air units the only way to attack eachother
3) Similar to 2) but just make the terrain un-traversable for ground units, (basically lots of hills, rivers, forests, and other un-passable obstacles which block any ground path between the two sides and force the players to engage in air combat)
4) Like you mentioned only allow the building of air units
5) We had a mission where you are up against this duke, he has a large base and in the back of this base is his personal base with his castle, the inner (personal) base is separated from the outer one by a river which had 2 bridges that the player could technically cross, but as soon as the player got close to this area the duke would have his forces destroy the bridges in a cinematic(no way around this). So the only way the player could've finished the mission was by attacking the duke's personal base using airships (no goblin airships or other air transports were available in this mission)
6) There was another mission where the last base you had to destroy was on top of a mountain, now while in theory you could go around the mountain and eventually get to the top where the base was this was very impracticable because I) the base was very well defended/fortified against ground invasions and II) You had a certain amount of time to complete the mission, so unless the player had some god like skills he would have to go the air route