The National Conference League club came out at the back after some confusion over numbers, with the new French Super League side, Catalans Dragons.
"We always enjoy our trips to Cumbria, but going to France will be something special," the club secretary Andy Byram said. Thornhill defeated Workington Town in the last round. "We're going now into the unknown," Byram said. "But it's a great adventure for us."
Elsewhere, the draw gave the holders, Hull, the hardest possible task - starting their defence of the trophy at Bradford, to whom they lost by six points in Super League on Friday night.
"Last year we had Super League opposition in every round and we've been unlucky in the draw again," the Hull coach John Kear said. "We're just going to have to do it the tough way again."
The Bradford captain Iestyn Harris is expected to be involved in the tie of the round. "There's always one that seizes the imagination," Harris said. "We had a great battle against them last weekend that could have gone either way and everyone wants to get through this time with the final going back to Wembley."
The other all-Super League tie is between Wakefield and Wigan. The final, at the rebuilt Wembley Stadium, will be played on 26 August.
Challenge Cup fourth-round draw (ties to be played 1-2 April): Featherstone v West Bowling or Keighley; Catalans Dragons v Thornhill Trojans; Swinton or Sheffield Eagles v Ovenden or York; Hunslet v Hull KR; Batley v Whitehaven; Widnes v Castleford; St Helens v Doncaster; Warrington v London Skolars; Harlequins RL v Toulouse; Widnes St Maries or Barrow v Oldham; Rochdale v Celtic Crusaders; Kells or Halifax v Huddersfield; Wakefield v Wigan; Bradford v Hull; Leigh v Leeds; Salford v Dewsbury.Reuse content