If when you close the door to the dryer you can hear the door switch click it is not likely the switch.
It is likely the fuse that has opened.
Here is a the fuse.
If the fuse opened check your venting for a restriction.
The fuse is located on the blower housing.
To open the dryer unplug it and pull the dryer out away from the wall far enough to access the back.
Remove the three hex-head screws from the rear flange of the dryer's top cover.
Lift the rear of the top cover and slide it back so the tabs clear the catches on the bracket and remove the cover from the unit.
Remove the three screws from the machine control electronics board bracket and tip the bracket assembly inside the dryer.
Disconnect the ends of the two ribbon cables from the machine control board.
Remove the two screws from the console bracket.
Open the door and pull out on the bottom of the console to release the locking tabs from the door panel.
Lift the console straight up until the brackets are free of the right side panel flanges and remove the console.
Push the wire holder out of the chassis hole.
Pry the door switch out of the cutout.
To access the thermal fuse remove the lint filter.
Remove the two screw at the bottom of the lower access panel.
Pull the panel out at the bottom and pull down and remove the panel.
Remove the lint duct bracket.