To correct the DCC direction program the decoder for long hood forward. This is done by entering 07 at CV 29 for 2 digit addressing or 27 at CV 29 for 4 digit addressing.
This photo shows an overhead view with the decoder boards installed. After programming CV29 to compensate for the main decoder board being on the long hood end, the engine should run in the correct direction in both DC and DCC modes.
If you are modeling one of the railroads that considered the long hood of the engine to be the forward end, then skip the reversal of the motor leads and the reprogramming of CV29.