A federal loan expected to be worth $6 billion to electric vehicle maker Rivian to finance construction of the company's planned Georgia factory was finalized Thursday.