I’ve used this solution for eliminating fruit flies for several years now. It gets rid of them in a couple of hours. Fill a shallow, large bowl or pan no more than half full with soapy water (squeeze your soapy sponge into the water). Fill a smaller container with a sweet vinegar or sweet wine (dump leftovers from the glasses from dinner). Set this container in the center of the larger container and place them both in the area where fruit flies are congregating.
The flies gravitate to the sweet vinegar or wine and drown in one of the two containers.