It is hard to say what kind of borer, as there are several that can attack figs, and you can only identify it if you see it. This article covers several kinds of borers and recommends treatments:https://extension.missouri.edu/p/g7190