In theory you should be able to boot into Recovery Mode using Command + R where you can launch Disk Utility. On one of the menus there should be an option to convert the Macintosh HD volume to APFS. Some people have had success, while others have reported that the volume could not be converted.
https://itectec.com/askdifferent/macos-how-to-convert-macos-extended-journaled-to-apfs/
I highly recommend you make sure to have a good backup before attempting to convert the file system to APFS (or upgrading to Catalina). If something goes wrong you could lose all the data on the drive if you don't have a good backup.
If you cannot manually convert the file system and the Catalina installer refuses to automatically convert the file system, then you will need to perform a clean install of macOS by first erasing the whole physical drive as GUID partition and APFS (top option) before selecting the "Reinstall macOS" option. Afterwards you can migrate from the backup to restore your apps and user accounts.
Another option would be to use Carbon Copy Cloner (CCC) to clone the Mojave drive to a USB drive since CCC is also able to recreate the hidden recovery partition. Then you boot from the external clone and use Disk Utility to erase the internal drive as GUID partition and APFS (top option). After which you use CCC again to clone the external drive back to the internal drive (also making sure to recreate the hidden recovery partition again). If everything goes well, then you should be able to upgrade to Catalina. Even with the CCC option, I highly recommend you still have a regular backup just to be safe.
A third option would be to attempt to reinstall macOS Mojave over top of itself hoping that the installer would automatically convert the file system to APFS, but there is no guarantee here.
You should always have frequent and regular backups of your computer and any external media which contains important and unique data.