Quark matter in neutron stars within the Nambu - Jona-Lasinio model and confinement