That is also ignoring the fact that you can't just take the entire GDP growth and use it to pay the loan, you have to collect fares and taxes which can only be a proportion of that growth. If you collect more in fares than the increase in GDP, you're leaving the country poorer than they would be without the railway.
Djibouti is going to need to see some pretty big additional growth from the railway to make the project worthwhile. Not to say they won't, be it's easy to underestimate just how big of a debt burden it is for a small country.