Could be correct.
You need to file part year resident returns for both PA and NJ.
Make sure that your NJ income is only that portion that was earned in NJ, not your full year. Looking at a NJ 1040NR, only your income earned while a NJ resident should be in column B.