There are certain ladders that are blocked by wooden spikes. But AI usually avoids them automatically.
Try pressing F1 -> Follow Me and then F1-> Charge.
But if you mean that they are just stuck on the top and getting killed, that could just mean that they are unable to pass and they might be generally too weak to push through. If the castle is defended by 6/7th tier of units right at the bottleneck, your units might have hard time pushing through them.
So they are probably not stuck, just being supressed by strong opponents.