Yes, if you invested £2m, you must have lived in the UK for five years and held ILR for one year (a total of six years) before you can apply for citizenship. This is also the case for dependants regardless of the total funds invested.
If you invested £5m or £10m, you are usually eligible to apply for citizenship after five years rather than six.
The absence requirements for British citizenship applications are more onerous than they are for ILR and so if you may want to apply for citizenship in the future, please contact us to ensure that you are aware of the requirements and can plan ahead.