Neutron-proton mass difference in nuclear matter