Unfortunately, there is not much you can do to prevent fruiting on a mature female Ginkgo tree. As you may know by now, planting the male tree would have prevented the issue of foul smelling fruit - of course, this Ginkgo probably wasn't a tree you planted.
There are several commercial products available on the market which can help reduce "fruit set" on certain trees/shrubs. Florel Fruit Eliminator is one such product. Unfortunately, there is no guarantee that this product will prevent all fruit set, nor is the product easy to apply on large trees - product must be applied to the entire crown of the tree during a very small time window of flower onset.
Realistically, if the fruit smell is unacceptable, your best bet is to remove the tree.