Sounds like what you have there is a washer with a bad lid switch.
As you open and close the washer lid you should be able to hear the lid switch click on and off.
The washer will not drain or spin with the lid open and with a bad lid switch your washer will act as if the lid is open even when it is closed.
You can check the switch with a ohm meter or just by opening and closing the lid to listen for the clicking sound of it working.
Here is what the lid switch for that model washer looks like.
Let us know what you find there or if you have any other questions.