Have a look at your ticket.
Even though you start the ticket purchase process by selecting a train that does not mean that you can only take that train. That depends on the type of ticket.
A regular ticket is good for a whole day, so you can just take a later train. There is nothing you need to do in that case.
If you have a “Sparpreis Europa” ticket you can change it, by calling +41 848 44 66 88.
If you have a “Super Sparpreis Europa” ticklet you are out of luck, as you cannot change that ticket.
It is normally not considered a good idea to buy a non-flexible ticket in connection with a plane ticket, for exactly the reason you just found out.
Note that there is a actually a bus from Basel Airport to Freiburg. It is not necessary to travel in to Basel city first.