The base halacha is that one is not allowed to turn on a fire / heat on Shabbos as it is a torah prohibition “lo tvaru aish bchol moshvosiachem ” thou shall not ignite fire in all of their inhabitations”.
In general, anything which one is not allowed to do on Shabbos one is not allowed to ask a gentile to do for him as well as this is a shevus a rabbinic prohibition “amirah laku”m shvus”.
Therefore one is not allowed to ask a gentile to turn the heat on for him and if the gentile turns on the heat for him if he did it due to the request of the Jew one is to leave the room for he is not allowed to benefit from the melacha (forbidden activity on Shabbos) which the gentile did for him ,
[1] however if he did it on his own one is not allowed to derive pleasure from it but isn’t obligated to leave the room.
[2]
Yet in certain situations one is allowed to have a gentile do a melacha for him one of them is in the case of illness when there is someone ill although it is not pikuach nefesh (life threatening) one is allowed to ask a gentile to do a melacha for a Jew.
[3]
Hence when it is cold for someone who is ill a gentile is allowed to turn up the heat for him and even more so the halcha is that “hackol cholim etzel hakor” that in essence everyone is considered ill with respect to the cold
(yet it is truthfully difficult sometimes to clearly resolve if it is cold enough to allow a gentile to turn on the heat).
[4] hence in a situation that the home is really cold in winter one is allowed to have a gentile add a log or turn up the heat for him (in truth this was the old age purpose of the “Shabbos goy”).
It is interesting to note that many contemporary halachic authorities point out that today this is also true in places with hot temperature or climate with regards to turning on a air conditioner (yet in truth the a/c might only be a rabbinic prohibition which is easier halachicly to allow a gentile to turn on in a case of need ).
[5]
Regarding the needs of a child many halachic authorities hold that it is compared just like the needs of someone who is ill which can be done by a gentile
[6], until what age? well in truth this depends on the need of the child and we find different ages given by halachic authorities with some poskim giving the age of nine as the cut off age.
[7]
therefore in your situation of heating a homme on Shabbos there are two legit reasons why you can ask a gentile to heat the home on Shabbos one because it is being done for heating in cold weather and secondly because it is being done for a little child.
Important note
The heter to use a gentile is specifically in a case where one cannot manage without him yet if you are able to manage (example to put in extra logs on Friday or by using a regular home heating system) then it is proper that you do not use the gentile rather arrange the heat in a way that you do not need the gentile to be mchalel Shabbos for you, but as long as you don’t have such a opportunity you can have a gentile turn up the heat.
[8]
[1] ראה שו”ע או”ח סי’ רע”ו ס”א, שו”ת אג”מ ח”ג סי’ מ”ז.
[2] ראה רמ”א רו”ח סי’ רע”ו ס”א, שועה”ר סי’ רע”ו סט”ו, וראה פסק”ת סי’ רע”ו סק”א.
[3] ראה שולחן ערוך הרב או”ח סי’ שכ”ח ס”כ.
[4] ראה שו”ע או”ח סי’ רע”ו ס”ה.
[5] ראה פסק”ת סי’ רע”ו סקי”ח וראה המצויין שם בהע’ 131 ודיון זה גם קשור לאם הפעלת מזגן הוא איסור תורה.
[6] ראה רמ”א או”ח סי’ שכ”ח סי”ז. ושועה”ר שם סכ”ב.
[7] ראה פסק”ת או”ח סי’ שכ”ח סקל”ח.
[8] ראה שועה”ר או”ח סי’ ש”ג קו”א סק”א.