Pockie,
I doubt it would be construed as discrimination, but testing these things at Employment Tribunals is expensive and stressing. Keep in touch with them and see what progress there is on getting into another gang.
From your post I was wondering if you did not know you were diabetic before that first medical?
If you did not, your results and diagnosis would have had a big impact on their decision - did they give you the details - have they referred you to a GP or Clinic?
I don't want to give you false hope but if you can give us some details of your results,diagnosis and treatment there are many people on this forum that will be able to help you understand how this might affect your work and how best to present your self for alternative positions.
Quite simply there is a huge variation in associated risk between diet controlled, drug controlled and insulin controlled diabetes - I am sure Network rail understand this, but you will be better able to argue your case if you do too.
Do follow up with Network Rail, in a positive manner, as soon as possible to see if they have found that alternative offered - All the very best...