A more directional and less sensitive mic like the NTG-2 may work better with some dampening on the walls or by adding a carpet. Additionally if you can't fix the room you can use a plugin to help reduce noise in dialog, something like Izotope RX7 will do a good job of doing this, but fixing the room should always be the first step.
I've used both the SM7B and the NTG-2 and I would record vocals all day with the SM7B if the room was in a good condition to do so or I was recording actual singing vocals. Otherwise I'd just use the NTG-2 which with it's highly directional nature is pretty good at removing a lot of other background noise.
Does the NTG-2 work well in a desk setup with minimizing typing? Iām looking to find a better quality mic (blue yeti now) that does better at minimizing keystroke sound.
The problem with the NTG-2 is it sounds reasonable enough when you have nothing being compared to it, but when you put it side by side with a decent dynamic microphone where you can listen to each one in an A / B test then it falls apart due to sounding super muddy and thin. It's something you can pick out in a blind test 100 out of 100 times if you have decent headphones and there's nothing you can do in post-processing to fix it.
Shotgun mics with a very good dynamic range and a pleasant tone tend to be pretty expensive. Usually in the $1,400+ range. Compared to something like the AT2005 which is a dynamic mic and is $80, but now it sits in front of your face.
This video has a pretty decent comparison of a high quality dynamic microphone to a $300 shotgun mic: https://www.youtube.com/watch?v=LiYEX-omlFk. It has both talking and typing tests. It's not the NTG-2 shotgun mic tho, it's the Deity-S. But it does serve as a decent base line comparison of how much worse a shotgun mic sounds unless you go up to the very high end.
I've used both the SM7B and the NTG-2 and I would record vocals all day with the SM7B if the room was in a good condition to do so or I was recording actual singing vocals. Otherwise I'd just use the NTG-2 which with it's highly directional nature is pretty good at removing a lot of other background noise.