Generally speaking, junior runners have to prepare for half a year (planned) before they can adapt.
Although you have riding experience, the marathon puts a lot of pressure on your ankles, knees and feet.
Without training, your joints and bones can't accept such great strength.
It hurts to run suddenly.