The KE (Key Exchange) payload contains the peer's public DH (Diffie-Hellman) factor and the DH group. Group 24 (2048-bit MODP Group with 256-bit Prime Order Subgroup) is defined in RFC 5114 and might not be that commonly implemented. The group together with others defined in that RFC are also not recommended anymore for use with IKEv2, according to RFC 8247.
The correct behavior for an implementation when receiving a KE payload with an unsupported DH group is to respond with an INVALID_KE_PAYLOAD
notify that contains an alternative and preferred group, with which the initiator should then try to connect again. If that's not the case the implementation is flawed.
Anyway, to fix the issue you have to configure a commonly supported DH group on each end.