it could be the cylinder but it also could be the brake activation circuit.
when you engage the drive it activates the brake release coil on the hydraulic valve and sends fluid to the brake cylinder to cause it to retract out of the wheel locks. If this is not happening you need to make sure the coil on the brake valve is actually being activated. If it is then remove the valve and check it for damage, if none found then check the cylinder. Note: the brake cylinders do have a spring inside them that forces them to stay in the locked position which requires hydraulic pressure to make them release. Not too long ago i had one do this and had to replace the cylinder(s) because the rod locked up in the cylinder packing nut.
First, make sure the battery is charged up...
then start troubleshooting the electrical and make sure the coil on the brake valve is getting a signal to tell the brake cylinders to retract.
if the coil and valve are working then look at the cylinders