A Geant4-based Monte Carlo Tool for Nuclear Astrophysics