Withdrew money from IRA, paid 20% in federal tax and used remainder to pay off loan in my current 401k with my employer. do I need to pay the 10% penalty?

loan payoff was in 401k with current employer.