OK I am a little confused here. Are you running it on DC or DCC? If it will not move on DC is DC disabled in CV29? On DCC are you calling up the correct address? Did you try address 3? Is the plug going to the loco from the tender in securely? A quick test of the plug is to tip the tender to one side and if the sound stops then the plug is not in very good.
When I got my Y6b a few years back, I found it very vexing that it would often not respond to my throttle commands. Finally, in desperation (okay, in anger…), I took it off the rails and rammed that plug hard and deep into its socket. She purred like a kitten and took off right smartly when I set her on the rails.
I can almost guarantee that you have not seated the plug sufficiently. Use a very fine needle-nosed pliers, with a tine on each side of the wire bundle, placed firmly on the back surface of the plug, and with a firm grip on the boiler and cab, push hard. The back of the plug should actually be deeper than the open rim of the receptacle, but not by much…maybe most of a millimeter.
Remember that reading the manual is a must when dealing with any sound equipped loco. Random pressing of function keys results in various forms of operation, including disconnect (which is what the OP described to a tee).
if its been in the case for a while, clean the wheels and give it a lube job. then give it a good break in run at half speed. it should run much better after the pickups clean up after use