You seem to be confused.
1.2 million refers to legal migration. Legal migrants can't claim benefits. Legal migrants, unless on a Teir 2 visa and working in Healthcare, pay £1065 a year to the NHS as a requirement for their visa. That's on top of tax and NI.
Therefore, they are all productive. They are earning, spending and not costing the government a penny.