dkh
Level 15

Activate your 1040X (and amended state if applicable) before doing entering anything.  

I believe you can enter the repayment on the 1099R worksheet on the  "amount repaid before filing 2020 tax return"  .  This will get you the result you need on the Form 1040X - or at least it did on the return I tested on.      

You can then put in the 1040X explanation  the repayment was in 2021 with documentation.