904 not shifting into gear

If it starts, rule out that switch statement. The first test would be; un-hook the linkage . in park or neutral, start it. Now with your hand, shift it, from under the car. Report back.