While Gruyere cheese is one of the keys to making the recipe "French onion", we sometimes may need to find a substitute. In this case, the very best substitute is to shred some Swiss cheese. The flavor profile of Swiss works very well in place of Gruyere.