A loved one passed away due to COVID-19. I took out money from my 401k to pay off a debt he left. Will I be penalized or is this a situation that can lower my bill?

Since I took out money from 401k before retirement I might have to pay an additional tax. I used most of the money I took out during COVID-19 to pay the debt of a loved one that passed away. Does this count as a situation that could lower my bill? There is one for "Death" but I don't know what expense applies to that situation.