The morality of the Gary the killer and Dan the ad man were certainly very different. But I don't necessarily agree that where the inspiration for the Nike slogan came from think that it makes Just Do It any less powerful. Or less moral, really.
Confidence is confidence. Even if the confidence feels macabre, like in this example.
It sounds like Gary had a pretty traumatic childhood to be able to commit the crimes you described. It sounds like he was more than ready to die. Poor soul, who hurt other poor souls.
If you look into the way the famous Nike swoosh that goes with the slogan was sourced, on the other hand? That's a tale of exploitation. The graphic design student that created the logo made a fat $35 for her work. The professor who took her work? Phil Knight.
https://www.freelogodesign.org/blog/2018/02/19/the-story-behind-the-nike-logo#:~:text=One%20of%20the%20founders%2C%20Phil,of%20the%20Greek%20goddess%20Nike.