Not sure this will work outside but it works inside.
Simply place a few tablespoons of apple cider vinegar, a few drops of dish soap, and a tablespoon of sugar in a bowl and stir. Set your bowl in an area where gnats are prevalent.
Also a fruit trap can prove effective.Cover a jar of overripe fruit with plastic wrap and poke small holes into the wrap’s surface. The gnats will smell a food source and enter the jar, becoming trapped.f
Also wonder if you just took your garden hose and sprayed them all w/water and let them fall into the pond and drown and fish will eat them up! Maybe this treatment first and then set out the other stuff above to prevent them from becoming too many again.