Here you don't say
zwei Kilogramm Kind (two kilograms of child)
like
zwei Kilogramm Rindfleisch (two kilograms of beef)
In the examples above zwei Kilogram is a measurement of the noun. But in your example it is part of an attribute of the noun. (The whole attribute is zwei Kilogramm schwer)
Compare:
ein kleines Kind (a small child)
ein puppenspielendes Kind (a puppet playing child)
ein mit Puppen spielendes Kind (a child playing with dolls)
ein zwei Kilogramm schweres Kind (a two-kilogram child)
ein zwei Kilogramm wiegendes Kind (a child weighing two kilograms)
Since it is an attribute, the noun must have the same case as if the attribute wasn't there:
Er ist der Vater eines Kindes.
Er ist der Vater eines zwei Kilogramm schweren Kindes.
The adjective schwer in zwei Kilogramm schwer must be declined the same way as if the measurement zwei Kilogramm wasn't there:
Er ist der Vater eines schweren Kindes.
Er ist der Vater eines zwei Kilogramm schweren Kindes.
Note, that here the measurement zwei Kilogramm does not refer to the noun (Kind). It refers to the adjective schwer which, together with the measurement, forms an attribute of the noun.