Thermal boundary resistance (TBR) at a liquid-solid interface that consists of simple Lennard-Jones atoms is studied by molecular dynamics simulation. A liquid layer is confined narrowly between flat solid surfaces in the simulation, and the mean density of the confined liquid is varied. A thermal gradient is imposed in the system by applying constant heat flux, and TBR is calculated using the temperature-profile results. TBR is highly dependent on the bulk density of liquid when the liquid does not wet well with the solid. The bulk density gives a dominant influence over the liquid-side structure at the interface, which determines TBR in part. In the system of fluid on a high energy solid surface, the wetting system, even when the interfacial structure shows a marked dependence on the density, TBR depends less on the bulk fluid density.