A heat pump can move more heat than the equivalent of the electrical energy put in. So the "efficiency" or COP is typically above 1. [When it falls below one, you're better off using electrical resistance heating.] Depending on the details of construction and the temperature differential, the COP can be anywhere from 1 to 6.
So if 40% of the NG heat energy gets turned into on-site electricity, and that electricity is used in a heat pump with a COP of 2.4, then it moves heat equal to 96% of the heat energy of the NG. Comparable to directly burning it on-site and capturing 94% of the heat energy of the NG. The comparison assumes that losses in moving the NG to the house vs to the power plant are comparable.
Cheers, Wayne