You are right on the 331 code. If you already replaced the encoder and the problem is still there, then look at the wires in the plug on truck where encoder plugs in for a half broken wire. You may have to pull slightly on wire to check. I have also seen bad drive motors and bad brushes in drive motor pop up this code.
This is ONLY to be used to report flooding, spam, advertising and problematic (harassing, abusive or crude) posts.