The problem you are having is the lid switch. If it goes out the unit will not spin. The unit should still drain though. If the unit will not drain then you may have a bad timer or the motor is bad.
The lid switch is not a difficult repair but it is not something that I recommend a novice DIYer try to do.
Please advise if you would like to do the repair yourself and I will provide you with a link to the service manual for your unit.
The lid switch is a common problem but once replaced should give you plenty of years of service. I do not recommend replacement of the unit. Just the lid switch.
If done by a tech it will run you about 100.00 to 150.00.
These are good units for the most part. But like all machines they have their problems. This and the drive coupler are about the worst problems most owners have with these units.