This problem is commonly attributed to a lid switch malfunction. The lid switch is usually mounted under the washer top casing, on the right hand side on most top load models. It is activated by a plastic piece on the lid (called a "Lid Strike") through a small hole on the rim of the wash tub opening. In many cases the lid strike breaks off the lid, or the lid switch becomes loose and no longer makes contact. Inspect the lid to make sure the lid strike is still intact, and then inspect the mounting screws (adjacent to the small opening on the wash tub rim) and make sure they are snug.
If you determine the switch to be defective, the following link explains how to replace one:
A replacement lid switch can be purchased on line at searspartsdirect
.com or appliancepartspros.com. All three sites offer competitive pricing, so shop all three for the best price. If you still need assistance, please contact me and let me know. If my diagnosis is not correct, please post back and elaborate a bit more so I can assist you further.