The trans oil will have nothing to do with the engine running well or not. None.
It sounds to me like you may have a faulty micro switch on the brake pedal. Get down under the machine (Take the deck off if you have to) and start looking for a small push button type switch that is located somewhere along the brake linkage. It can be anywhere from right up near the pedal, to all the way back to the trans where the linkage goes in. They are usully located under the foot rest on most Deere tractors. There may be a bad switch, but it may simply be a wire has been rubbed raw and is shorting out on the frame when you move the pedal.