Dell laptop: model?
New keyboard: source/vendor/seller? Is the keyboard truly new, reconditioned or used?
Carefully compare the old keyboard's ribbon latch to the new keyboard's ribbon latch. Look for something that may be interfering with the latch. A magnifying glass may be helpful.
The latches/connectors must be 100% identical.
If so, then with the new keyboard uninstalled, work the latch a few times to "loosen it up" and then if necessary carefully plug in and unplug the connector a few times.
Could simply be stiff and needs to be teased or otherwise rocked into place so the latch will engage.
Again do so carefully and slowly - do not force the latching. If all is correct it should latch in. Watch what happens if...