Your federal wages for the year will be the total of everything you earned, regardless of where you earned your wages or where you were living.
New York will tax all your wages for the year, since the money was earned in New York.
New Jersey will tax only what you earned while you were a New Jersey resident. New Jersey will also offer a tax credit for taxes paid to New York during the time that you were a New Jersey resident.