After you enter your 1099-R, continue in the interview, TurboTax will ask you if any of the exceptions apply.
The other answer is about the penalty exception for taking an IRA distribution for education.
Are you asking about the penalty exception for a 529 plan distribution? You claim the exception on form 5329.
If you enter the 1099-Q and then all your expenses, TurboTax (TT) can theoretically handle that. But it can get messy. If you need a workaround, reply back for details or see the links below. Indicate whether you are using the scholarship exception or the tuition credit exception.