The light staying on inside when the door is closed does indicate a door switch failure. I recommend replacing this component.
You can order a new door switch from the
website. The part number for the door switch is 8574875.
The procedure for accessing the door switch is shown in the image below. Be sure that you
unplug the dryer
to disconnect electrical power before accessing internal components.
If you need more help, resubmit your question with additional details.