Retirement tax questions

It cannot be done as you want it to be ... it is not allowed because there is no way to properly report it and  the IRS will not see the situation and it will cause confusion you don't want.

 

You took a DISTRIBUTION from the retirement plan which is reported on a 1099-R that the IRS sees.  Then you made CONTRIBUTIONS to the 401K via payroll deductions PRE TAX which the IRS is also told about via the W-2.   If you want make a Covid repayment of a 1099-R distribution you must use funds from outside of the payroll situation  and tell the 401K administrator that this is a covid repayment  so that the repayment will be properly reported on a form 5498 which is sent to the IRS as well as you.  This is how the IRS tracks the distribution and repayment to confirm what you did.  They will not see the 401K contribution of new funds as a roll over from old distributed funds  so the IRS will send you a notice in a year or 2 for the unmatched repayment.