I have had good luck with the 3m window setting tape. It is a sticky rope made of Butyl rubber and you can stretch it until it is the right thickness. Then apply it to the heater box and fasten the box down. Seals great, does not make a big mess.
Several people suggested GE Silicone II because it stays flexible after curing. I used it to reseal the heater box top after installing a new heater core and it worked great.