Heat transfer across nanogaps between solid surfaces has received an increased attention driven by both recent experimental investigations and technological applications as well. Most of the studies concerned, however, vacuum conditions and relatively few attention has been paid to the situation where a gas occupied the gap. This latter situation is difficult to handle theoretically because a continuum description of heat transfer across a nanoconfined gas medium completely breaks down. This breakdown maybe related not only to the partially ballistic nature of heat transfer between the surfaces but also to the existence of an adsorbed gas layer which affects energy transfer across the gap. In this work, to better understand the interplay of these effects, we present a series of molecular dynamics simulations of argon gas confined between either metallic or silicon walls held at different temperatures. The gas density is tuned so that the gas experiences a wide range of Knudsen numbers ranging from the continuum to the free molecular regime. It is shown that the Debye temperature of the solid controls the amount of adsorbed gas close to the walls, which in turn controls heat conduction in the middle of the channel. While the nanochannel walls significantly impact the density and temperature distributions of the rarefied gas, the pressure and the heat flux across the gas domain converge toward a plateau as the gas becomes denser. Finally, we also derive new analytical formulas to calculate the gas pressure, induced heat flux, and effective thermal conductivity of the nanoconfined gas. These formulae, which take into account the effects of an adsorbed gas layer, are shown to hold over a broad range of Knudsen numbers in the range 0.05–20. This framework allows one to predict nanoscale heat transfer across a gas confined by a variety of solid walls.