Certified GKH Gardening Expert
There are a few reason that this will happen. Most typically, stress from underwatering or severe lack of nutrients will be to blame. Unfortunately, too much nitrogen can be to blame, as well, since it will reduce the amount of potassium and phosphorus that the tree can take up. Here are some articles that will help:
https://www.gardeningknowhow.com/edible/fruits/figs/figs-not-getting-ripe.htm
https://www.gardeningknowhow.com/edible/fruits/figs/fertilizing-fig-trees.htm
https://www.gardeningknowhow.com/edible/fruits/figs/how-to-grow-figs.htm