Yes you can get from the Airport to Kandy, but there is not a straight route, and can take upwards of 5 hours.
Best to take a tuk to to Avirawatte bus stand, walk out the airport then go right you will see the tuk tuks on the road. You could also wait an hour hour Arrivals-Avirawatte-Colombo line 187 bus, but the it only takes a few minutes so tuk tuk is better.
From bus stand Avirawatte bus stand buses run all night every hour to Kandy.
To go by train, then spend the first night near Colombo Fort and get the 7:00am train to Kandy.
You can secure seats for that via exporail. And it is a fast train, you would get to Kandy before 10:00am