In pure grammatical terms, it's: "Goodnight, John." This is covered in the lesson vocative case. However, I judge there is a lot of leniency on this subject, and it would a strict grammarian who picked you up for "Goodnight John", in my opinion.
I would pick you up on it, but I don't get out much... Goodnight, John.