This is not an instant-cure, but works well as a long-term cure for the ant problem.
There are two products I know of that will kill an ant queen, but not a bee queen. The first is instant grits. Make sure you get instant, not old fashioned or 5-minute. The ants carry them back to the nest, and feed them to the others. When mixed with the formic acid in their stomachs, the grits expand, killing the ants. Sooner or later, the queen eats one and dies. Slow, but eventually effective if you are persistent. The second one is Tarro ant bait. It is a liquid that comes either in a container that only an ant can crawl into, or in a bottle that you use to dot the liquid onto a piece of paper to leave out for the ants to find. Try to find the former, as it is bee-proof. Break off one of the plastic containers and leave near the ants' nest, then replace as needed until the ants are all dead.