Jon screamed at the undead dragon to distract it so Arya can run past and kill the Night King. The undead dragon was protecting the entrance to the Godswood.

Watch it again, you can actually hear him scream ‘GOOOOO – GO – GO.’ 10 seconds later the scene you can see the hair of a White Walker flying up when Arya sprints past the group of White Walkers.

Jon once again was ready to sacrifice himself to kill the Night King.