Boiling water
A spray can of an insecticide containing pyrethrins (natural insecticides produced by certain species of the chrysanthemum plant) or resmethrin.
That will kill off the adults.
But you may have to remove toilet and treat the underside of it along with the toilet to tank dump line and the vent line.
The sewer flies thrive on waste. Adults emerge from the pupae every 20 to 40 hours and leave 2 weeks continuously laying eggs which hatch in 38-40 hrs.....on and on and on.
Clean the black tank aggressively.
You aren't leaving black tank drain valve open....correct????