From my understanding in NJ you had to register at least 15 days before the primary, if you were changing parties.
No, you had to register to vote at least 15 day before the primary. You do not have to declare a party. Most NJ voters are independents, about 60%.