Test the flame sensor by removing one of its wires and measuring for near 0 ohms of resistance. If the sensor is open, replace it. Reassemble the unit, reconnect the gas and power, and test a load of laundry. If the dryer still does not heat, call a professional service technician to check the motor centrifugal switch or wiring failures.