I rolled over my 401k from a previous job directly to a roth ira. I received my 1099-r which has a distribution code of 2 , early withdrawl. if i rolled over the 401k wouldn't it be a code G ? and should box 2a have the same taxable amount as box 1. I really don't understand any of this so am open to all explanations . Thank you.
A rollover from a regular 401K account to a ROTH IRA is actually a conversion and a fully taxable event. You probably should have rolled it over to a Traditional IRA account to preserve the tax deferred status. Now it is 100% taxable. I'll page someone who knows more about that. @dmertz
A direct rollover to a Roth IRA is one paid directly from the 401(k) plan to the Roth IRA for your benefit. If the payment is instead made payable to you and you subsequently roll the distribution over to a an IRA (traditional or Roth) within 60 days, it's an indirect rollover.
A direct rollover from a traditional 401(k) to a Roth IRA should have code G in box 7 and the taxable amount in box 2a. If you had no after-tax contributions in the traditional 401(k), the amount in box 2a will be the same as the amount in box, 1. With a direct rollover, one would usually roll over the entire distribution and have no taxes withheld shown in box 4. With the entire taxable amount rolled over, estimated taxes may have to be paid to avoid a tax underpayment penalty.