Many insecticides are available for controllingn peach twig borer. Sprays should be timed for when the larvae are young and more vulnerable. Always read and follow all label instructions.
For low populations in areas far from untreated orchards, mating disruption can provide some control. The idea is to blanket the orchard with pheremone so that male moths cannot find females and mate. The unmated females then die without producing any eggs.