Download Rom, gapps, magisk. Copy everything to your PC, including all photos, documents, backups of anything else you want.I do have TWRP. It's great to use and better than Clockwork for me.
I didn't know installing a new rom would clear root, though. I thought you had to be rooted in the first place to be able to install these roms. At least that is how it was for me on the Evo and Note 2.
Boot to TWRP, make sure you can access phone from PC to copy stuff back afterwards. Make sure this works or you'll be stuck without phone until you get it going.
Format Data (have to type yes) them wipe system and data. Reboot to TWRP. Copy Rom, gapps, magisk to the phone, then flash them all in the same order.
Reboot to system, setup phone and restore backups etc.