You're going to have to ERASE the iMac internal drive before you can install Mojave.
So... do it this way
(this assumes the version of Mojave you have on the flashdrive installer is a good one for the iMac you have):
1. BACK UP the internal drive as it is now. I recommend using CarbonCopyCloner, which is free to download and use for 30 days. YOU WANT A CLONED BACKUP, NOT a time machine backup.
2. BOOT FROM the USB installer -- reboot and hold down the option key until the startup manager appears -- then select the flashdrive with the pointer and hit return.
3. If it boots to the installer, DO NOT attempt to run the installer yet. Quit it and open disk utility.
4. In disk utility, go to the view menu and choose "show all devices" (VERY IMPORTANT step).
5. Now select the top line on the left that represents the physical drive inside the iMac, and click the erase button.
6. Erase it to APFS, GUID partition format.
7. Now quit disk utility and re-open the OS installer.
8. Begin the install. The iMac may reboot one or more times, the screen may go dark for several minutes and liven up again, you may see one or more progress bars. BE PATIENT.
9. When the install is done, you should see the initial screen (choose your language).
10. When setup assistant asks if you wish to migrate from another drive, connect the backup and give it time to digest everything.
11. BE AWARE that setup assistant is intended (by Apple) to migrate "from older to newer". It MAY NOT WORK when you're trying to migrate from "newer to older".
12. This is where the cloned backup comes in. Unlike tm, you can mount a cloned backup right in the finder and copy stuff from it as you would from any other drive. You may have to go to "Get info" for the drive and set the option to "ignore ownership on this volume" to avoid permissions problems.
Easy process, eh....?