I had the same problem and it was the pushbutton switch in the door, nothing wrong with the step itself. That is a common place and an easy check to make. My two connections on the switch were a bit corroded and I simply cleaned them and lubricated the plunger.
Also, often if you have the common push button mounted door switch like mine, the problem can be solved by simply rotating the push button with your fingers. Sometimes a slightly corroded connection just needs a little help. I twist mine a few turns every few months when I think about it just to prevent the problem.
PSW
2013 Phoenix Cruiser 2350
2014 Jeep Cherokee behind it
and a 2007 Roadtrek 210P for touring