For anyone who gets this warning: “An error occurred while preparing the installation. Try running this application again,” consider trying the following:
Do a Spotlight search for "Install MacOS". It will find all the MacOS X installers on your hard drive(s).
Once you see it, "Install MacOS Mojave", scroll down to the Spotlight search results to the bottom to where it will read, "Open All in Finder". Select that, and a Finder window will appear with items grouped together.
Look for the grouping of Applications and you should find the installer. Select the installer, then either right-click and select "Move to Trash", or left-click and hold on the installer for Mojave and drag it to the Trash, located on the Dock at the bottom of the screen. If you are left-handed and have your mouse configured as such, reverse the left and right instruction from before. Empty the Trash.
When you click the link to return to the MacOS Mojave page on the Mac App Store, you'll note its button will have changed from "Open" to "Download". Download a clean copy (ideally with no other programs, especially web browsers, open), and the fresh, clean copy of the installer should launch and run without a hitch.
Hope this helps!
My MacOS Mojave install was performed on a Mac Pro mid-2010 tower.