Which training program did you use? Perhaps if you give us some more details we can make some suggestions.
By the way, I ran in Rock 'N Roll the last two years. You weren't the only one having trouble down the home stretch this year! It was hot and many people had trouble with dehydration or just simply going too fast for the conditions.