Hi, Epic staff released a tutorial series for time attack, with a checkpoint system and timers.
Tutorial
Take a look,
You can compare the checkpoints the vehicles have reached, and then compare the distance to the next check point.
That way, if someone missed a checkpoint, he will loose rank, and the other will be sorted like this: for each car, get distance from next checkpoint, then the smallest will be the best ranked
Just an idea, i hope it works