Presuming the ride is unsupported, even for getting to/from the start/finish. The extreme points of the End-to-End are both about 17 miles from the nearest station.
Land's End - nearest station is Penzance where long-distance mainline trains terminate. It's an undulating but easy ride with the A30 being the most direct : there will be some traffic but in my experience (4 rides) it was not over-fast.
John O'Groats - nearest stations are Wick or Thurso (on the same line) with an infrequent local service from Inverness. Both stations are an easy 17 miles or so from JOG - although the wind may be a challenge.
Long-distance mainline trains, together with medium distance trains from Glasgow & Edinburgh, terminate at Inverness. The Scotrail Sleeper from London and some other locations is an excellent, time-saving, way to get to/from Inverness. The local service north from Inverness is notorious for bike transit problems - you are advised to OBTAIN A PHYSICAL CYCLE RESERVATION TICKET when you book the passenger ticket.
Bikes on trains are problematic and booking is always recommended - even if you turn up at the train and there is bike space it's possible that another rider has a cycle reservation from another station on the route and will take preference - it is not unknown for bikes and cyclists to be ejected from the train for lack of a cycle ticket.
Flying to/from Inverness is possible from a few places in the UK - it is also (sometimes) possible to fly to/from Wick but bike transport is variable and subject to passenger numbers (bikes are dealt with on a "standby" basis, without guarantee) The planes are very small, bikes replace passengers!

