Installing night-light switch on hot-neutral-ground circuit
That won't work.  The problem with this and any other powered switch, dimmer, motion sensor, etc. is that the switch itself is a load.  

As such the powered switch needs always-hot and neutral all by itself, and of course it also needs a switched-hot wire so it can operate the light.  That is three wires, and the ground doesn't count.  

I see where you have only one /2 Romex with two wires in it.  That means it is a "switch loop" (that's a google word) and will not have a neutral.  (Or perhaps it is wired backwards, and it has a neutral and no hot). 

Since you have the wall off, consider replacing that /2 run with a /3. That will provide what you require.  Use the red for the switched-hot.  

This is now required for new construction. 

Another option is to use a "smart switch" to control the light, which talks wirelessly to a control module in the light fixture.  In this case the control is wireless and the switch loop wires are redesignated as always-hot and neutral.