Get your taxes done using TurboTax

I file my 2022 taxes in 2023, and had to pay a lot of taxes back. I purchased a home and use my down payment from a 401k, deducted my taxes once I pulled that money out, when I did my taxes the money I used for down payment was considered income. Can someone explain? To my understanding was that to purchase home using money from 401K would not be considered income.