I entered the thread to respond to a challenge posed by @Hussar - he seemed to think it hard to explain why someone might think the OP paladin did the wrong thing yet Captain America did not do the wrong thing in purusing the fallen Bucky to try and rescue him. Whereas I think explaining that is very straightforward drawing on well-known resources in completey mainstream approaches to morality and ethics.I specifically do not think it adds to the OP's scenario or ask for assistance.
As for the OP's problem, there are so many possible solutions it's hard to list them all.
The paladin atones.
The dragon turns out to be a gold dragon in disguise, testing the paladin and counselling him on not giving up hope.
The NPC regains consciousness in the dragon's claws and forgives the PC.
And those are just the ones I came up with in the time it took me to type them. The second two obviously trade on the GM's control over the fiction in a typical 5e game. If a GM has made a bad call in adjudicating and communicating the fiction, that's where I would look for a solution. The idea that the solution is to be found in punsihing the player seems completely misguided to me, although I know that's a time-honoured tradition among some D&D referees.