I'm afraid the earnings on your distribution are taxable, even though you put it back. In order to have prevented it from being taxable, you have had to "roll it over" to another 529 plan within 60 days. You will have to report taxable income and pay a 10% federal penalty tax on the earnings portion of the non-qualified
distribution. The principal portion of your 529 withdrawal is not
subject to tax or penalty.