A while back I had a very scary dream. How can I prevent it from coming back?

You can't; accept it. Sleep state is unconcious, and not 'controllable': a 'mind of its own'. Dreams reflect recent daytime activities in the context of all your life's brain-imprinted complex neuronal connections (which is why artificial intelligence will remain rudimentary. Let ur conscious state consider dream: share details w someone who knows u. Don't over-analyze. Laugh @ it, conquer it, it'll go away.