In the 120V circuits of homes and offices, the grounded conductor is the same as the neutral. Typically, when wiring a switch for a 120V load (e.g., a light) only one wire comes to the switch and only one wire leaves the switch. You need to make sure this is the hot, not the neutral [NEC Sec. 404.2(B)].
Switch Connections on 120V Circuits
Consult NEC Sections 404.2(B) and 404.2(C) when wiring a switch.