Both of the previous posts are correct, here's some further info: between 2006 & 2007 the forward/reverse solenoids were changed from a square unit mounted with four screws to a round unit that screws in. The later round units almost never gave trouble compared to the earlier square units.
Additionally, there is a throttle pedal position sensor that can give trouble and cause the same issue. It's under the floor plate and attached to the forward/reverse pedal assy.
Edit to ddrr's post: if it's the pedal position sensor or the ring gear worn, occasionally it will throw an error code, although more often will not. Also the ring gears wear in three places, and can be viewed at the top of the engine next to the hydrostatic pump, or through a hole in the bottom of the bell housing on the engine side (there's a grommet to remove) accessible if the floor plate/sump cover plate is removed.
This is ONLY to be used to report flooding, spam, advertising and problematic (harassing, abusive or crude) posts.