Scan it and see if it is the solenoid. No sense buying an electronic item (usually non returnable item at most parts stores) if its not the issue. These transmissions did have solenoid issues though.
Also make sure the wiring connectors are clean and tight.