When you operate the cabin switch, can you hear the solenoid behind the instrument panel closing. You may have to open the door to the back of the instrument panel while a second person operates the windlass switch.
If the solenoid is working, check the connections to the windlass inside the anchor locker. On my boat, the wire connections visually seemed OK, but the ground wire connection was bad and pulled out when a strong tug was made on the connection.
We re-did this connection and all worked again on our boat.
In our case, while raising the anchor I did not knock down the chain stack often enough and the when the chain stack hit the windlass, it caused the windlass to lock-up and the chain stack must have simultaneously hit the wiring to the windlass, loosening the connection.
Check the wiring closely, with a decent tug on the connections, before you start replacing the expensive pieces like solenoids or windlass motors.