Forward Modeling For Gravitational Lensing In Cosmology