With so large number i get the motor moving atleast, but it's not fast. It takes like 15 seconds to move 20cm.
My knowledge about stepper motors are limited, from what i read 4 wire motors are bipolar, i used a multimeter and there are resistance between red - blue and green - black wires on the stepper. I also tryed switching the red to a- and blue to a+ but nothing happend it still runs slow.
Have you set the driver for full steps or microsteps?
Is the motor missing steps?
Have you set the correct current limit on the driver so it matches your motor?
I have no experience with a DUE. The demo code in the link below works on an Uno or Mega - but I don't see anything wrong with your test program unless the Due and Accelstepper don't like each other.
Does the DUE work on 3.3v? Is that compatible with your stepper driver?
Have a look at the AccelStepper author's main page , where he explains the library and its limits.
It says that you can send a max. of 4000 steps/sec to a motor.
In your case you try to send 20,000 steps - that is way too much for this library!
I assume that the library gets in trouble and is heavily dealing with getting rid of the step-overflow.
If your motor needs 200 steps/revolution, then maxspeed = 4000 = 20rev/sec.
If this is too fast then, you can either reduce the steps/sec (maxspeed) or you use microstepping which makes the motor move smoother (at the cost of reduced torque).
Start with setting maxspeed to 2000 (at fullstep); this should move the motor 10 times/sec and after 10sec it should have reached your goal (stepper.moveTo(20000)).
If that is ok for you, you can try to set maxspeed to 4000 and set microsteps to 1/2 and should have the same result (destination reached after 10sec).