Turn the gun onto it's left side down and pull the bb out with pliers (that way if you slip it won't fall into the mechbox). Take a really good look with a bright flashlight to see that there aren't fragments in there. If there are, open'er up and clean them out.
Once the bb is out...you should be able to cycle the mechbox now that nothing is impeding the piston.
If there's a really stiff spring in there, the startup torque of the motor might not be enough to pull the piston back from it's 80% pre-compressed state. Make sure the batt is fully, fully charged...and if that doesn't do it, you can firmly pinch the back sides of the piston with your off hand and help pull it back will firing...(just like racking a pistol...it's pretty unnerving when it does fire...don't drop it!

)
MadMax had a great suggestion of using a rod pushed down the nozzle end to push the piston back...I'm sure that's a bit unnerving as well.
Best of luck!