It will be much easier if you have your new Rom on your external sdcard prior to starting this. It will also stop a number of problems if you have SuperCID (11111111) If you don't know how to - FASTBOOT Commands
1. Enter the command "fastboot oem readcid". Make and KEEP a note of your original CID.
2. Enter the command "fastboot oem writecid 11111111"
3. Enter the command "fastboot read cid" [it should confirm your CID is 11111111]
4. Press the volume down button twice on your phone and navigate to reboot bootloader, then hit power button to reboot the bootloader.
5. Bootloader will also say "CID-11111111" now to confirm (Thanks to @xl VipeR lx ) Also to @umjammerlammy for the GENTLE reminders to include this

Make sure the firmware file and twrp recovery are in your Android directory on your PC - Mine is

During this process you may find that when you reboot the phone starts to boot into android. Mine did but simply had the GPE animated logo but never entered GPE. All you do is press Vol up and power for about 10 seconds to reset. As soon as it resets press vol down and power to get back to bootloader.

Flash 1.54.401.5 firmware from Here
Fastboot Method
Boot device into FASTBOOT mode either by adb reboot bootloader or Vol down & Power (device should show FASTBOOT USB)
Make sure the firmware file to be flashed is in your android folder
Open a command prompt from the folder where fastboot resides. (Hold shift key/right click in the dir to get menu - left click on Open Command Prompt here.)
Run the following commands:
fastboot oem rebootRUU (this will reboot the device into RUU mode in preparation for zip flashing)
fastboot flash zip (the name of the zip should EXACTLY match the name of the file you're flashing)
It will fail the first time. Run the same command AGAIN until you see it has flashed successfully.
I repeat - Run the same command TWICE until you see it has flashed successfully.
Once complete, type fastboot reboot-bootloader The hyphen is required.

Some users have stated this firmware (1.54.401.5) did not work for them as they weren't GSM and reboots just threw them back to recovery. If this happens try a stock (your original e.g. T-mobile) firmware then follow the rest of the process.

Boot into stock recovery
Factory reset
Reboot into bootloader
Flash TWRP - command = fastboot flash recovery openrecovery-twrp- (The must match exactly the name of the recovery you are flashing and remember the recovery file must be in your android folder)

Boot into TWRP
Go into Wipe menu
do a full factory reset wipe
Reboot back into recovery
Install rom