Dividends from company stock in your 401(k) paid to you instead of remaining in the 401(k) are distributions to you from the 401(k) and are taxable as would be any other regular distribution from your 401(k) (code 1 in box 7 of he Form 1099-R), subject to ordinary income tax and an early-distribution penalty unless you have a penalty exception that applies.
If the dividends were instead paid to you from ESOP shares (not shares in your 401(k), code U in box 7 of the Form 1099-R), the dividend distribution paid to you from the ESOP shares would be taxable income but not subject to early-distribution penalty.