In this paper, molecular dynamics simulation is used to investigate the effect of copper and argon nanochannels size on the thermal conductivity of argon. Thermal conductivity is calculated by nonequilibrium molecular dynamics (NEMD) simulation. Simulations are performed for different distances between the walls. Results for both copper and argon walls are investigated individually. Results show that the existence of argon walls has little effect on the thermal conductivity. However, the amount of it for the argon confined between the copper walls is affected by the distance between the two walls. In the same way, the effect of wall roughness on the thermal conductivity is investigated, which shows that roughness is effective only for low distances between the walls. Also, the thermal conductivity of argon under Poiseuille flow in a nanochannel is studied. The results indicate that by increasing the driving force, the thermal conductivity increases and the increase ratio is higher for larger forces.