** I have duct taped the assembly to the underside of the machine. I guess I have to replace the entire assembly **
Yes.
** I'm just unsure how to go about it. **
On the 'direct drive' washer design like you have the whole cabinet may have to be removed (or at least tilted forward) to access the switch assembly and wiring: