Changing locks

I was told by police that my husband had the right to change the locks on the house that is in my name only because I moved out…they said that if I still lived there he couldn’t do that…true?

Yes, the police are correct. If you left and established a new residence, he can change the locks and have you charged with domestic criminal trespass if you try to go back uninvited. If you want to return to the house, you need to file an action for equitable distribution and file a motion for interim distribution of the marital residence so you can move back in.