Retirement tax questions

You have to make the repayment with money from outside.  Then by putting in back in within the 60 days it will make the 1099R withdrawal not taxable in the first place.  After you enter the 1099R you say you rolled it over even if you put it back in the same account.  When did you take the distribution?  Was it in 2020?  Did you elect to spread the taxes over 3 years?