A national missile defense system would cost $1.2 trillion to build and maintain over the next 20 years, a nonpartisan federal agency estimated.