The line connected the Great North of England Railway (GNE) (later the York, Newcastle and Berwick Railway, YN&B) near York to the Leeds and Thirsk Railway (L&TR) at Knaresborough, with a route length of about 15 miles .