Trains are inherently costlier than air, especially over longer distances. National railways are very often subsidised too. A railway needs not only a station at each end but the expensive infrastructure and maintenance all along the journey. A plane just needs somewhere to take off and somewhere to land , nothing in-between.