Are milligrams kilograms and gallons liquid measurements?

No. Milligrams and kilograms are measures of weight or mass. Gallons is a measure of volume.