Fast Inference Using Automatic Differentiation and Neural Transport in Astroparticle Physics