I have resolved this by using the parameter HOST_NAME = "CUSTOM_HOSTNAME" in the respective distro's bb file, in my case it is ls-image-main.
I created a ls-image-main.bbappend in my custom layer and added this line in that file and after building the distro recipe, host name change was reflected in the image.
Regards
PVSN Subhash