We study the effect of physics input on thermal evolution of neutron stars in soft X-ray transients (SXTs). In particular, we consider different modern models of the sources of deep crustal heating during accretion episodes and the effects brought about by impurities embedded in the crust during its formation. We simulate thermal structure and evolution of episodically accreting neutron stars under different assumptions on the crust composition and on the distribution of heat sources and impurities. For the nonaccreted crust, we consider the nuclear charge fluctuations that arise at crust formation. For the accreted crust, we compare different theoretical models of composition and internal heating. We also compare results of numerical simulations with observations of the crust cooling in SXT MXB 1659-29. We found that the nonaccreted part of the inner crust of a neutron star can have a layered structure, with almost pure crystalline layers interchanging with layers composed of mixtures of different nuclei. The latter layers have relatively low thermal conductivities, which affects thermal evolution of the transients. The impurity distribution in the crust strongly depends on the models of the dense matter and the crust formation scenario. The shallow heating that is needed to reach agreement between the theory and observations depends on characteristics of the crust and envelope.