GWM is for Heavy weapons. Long swords wont trigger the bonus damage.
GWM is the Feat.
GWF is the Fighter/Ranger Fighting Style that lets you reroll 1s and 2s on damage from weapons wielded in 2 hands.
OP is correct, GWF should reroll that 1. However, I don't know if it did reroll the 1, and it just happened to roll a 1 again (which is then kept as GWF only rerolls the dice once)