Installing a Pilot Light Electrical Switch
It appears the switch you've purchased requires a neutral and you do not have a neutral wire available at your switch (only the hot and the switched hot). You'll need to either run a line to the switch that includes a neutral, which is now a standard practice, or you need to find a switch that will work without a dedicated neutral. Finding the latter may be difficult as the versions with a dedicated neutral are fairly standard.