Replace Dimmer Switch with normal switch
The only wires that should be connected to the new switch are line, load and ground. The old switch likely had circuitry that required a neutral for operation. Basic switches do not use a neutral, just line, load and ground.