Hello,
According to the documentation, it appears that the DH Group 24 should be supported in IOSes starting with version 15.1(2)T. You would need to upgrade to that version or newer, the latest IOS for your 2821 appears to be 15.1(3)T1 according to the Feature Navigator.
Best regards,
Peter