You need to post full details of the hardware you mention, that means links to the datasheets or product pages, so we can know precisely what you have. Details like this are usually vital.
So motors, motor shield and power supply details please. You probably will need to replace the L298N shield with a stepper driver suited to your particular motors.