Is that magwell block what you're going to use to remove the old barrel nut and install the new one.
Although many have used a magwell block and have gotten away with it, I've also seen a number of cases where the locator pin in the barrel extension snapped, the upper receiver was damaged by the locator pin or the pivot and/take down lugs got damaged.
The ideal tool for removing and installing barrel nuts would be one that clamps into your vice and engages the lugs in the barrel extension.
What brand of upper is that and is the handguard the one that came with it? I'm asking because some manufacturers put some sort of thread locker on their barrels nuts and they can be a bear to get off. In the case, the use of a magwell block is definitely the wrong tool.
Handguards typically come with their barrel nuts. They usually don't mix and match. I'm not sure what you mean by a handguard that "mates" with the upper. Many handguards come with anti rotation tabs, but fit varies from loose to needing to remove some material to make it fit. I'm sure there is someone out their making a receiver and handguard combo intended to fit together, but it isn't the norm.
The gas block is likely carbon locked. Squirt some carbon cleaner or clp in there and try twisting it off. If you do go beating on the muzzle end of the barrel, put a flash hider on it or something. Make sure its bottomed out so you dont mess up the threads.