Get your dog neutered.
I'd consult with a trainer.
If it all doesn't work out, find a home for the dog without children. Killing the dog shouldn't be an option just because he hasn't been properly trained. Training doesn't mean hitting the dog. That will only make aggression worse.
Honestly, if you're even contemplating killing your dog, you probably shouldn't own one.