Controlling a DC motor for a certain amount of time

My problem is that i have to use some kind of delay, to control the distance for which my motor runs.

No you don't.

I also checked out the "blink without delay", but i can't seem to make it work.

Without showing us what you tried, we can hardly tell you what you did wrong.