1099Q distribution

Grandchildren decided not to go to college.  I paid the basis in post tax dollars.  It looks as though I am paying taxes on the gross distribution, not the earnings.  Is this right?