Modeling the spatial distribution of neutron stars in the Galaxy