According to Baidu map query, the whole journey of self-driving is about 340.8 kilometers, and it takes about 3 hours and 52 minutes for the two places. Via: Yongzheng Expressway and Shen Chang Expressway.
You can also take the D6324 train from Longyan Station to Gutian North Station, which takes 2 hours 3 1 min, 1 12 yuan.