Stochastic heat transfer simulations play a pivotal role in capturing real-world uncertainties, where randomness in material properties and boundary conditions are present. Traditional methods, such as Monte Carlo simulation , perturbation methods, and polynomial chaos expansion, have provided valuable insights but face challenges in efficiency and accuracy, particularly in high-dimensional systems. This paper introduces a methodology for one-dimensional heat transfer modeling that incorporates random boundary conditions and treats thermal conductivity as a random process The proposed approach integrates Monte Carlo simulation with Cholesky decomposition to generate a vector of thermal conductivity realizations, capturing the inherent randomness in material properties. Finite Element Method (FEM) simulations based on these realizations yield rich datasets of temperatures at various locations. A deep neural network (DNN) is then trained on this FEM data, enabling not only rapid and accurate temperature predictions but also bidirectional computations—predicting temperatures based on thermal conductivity and inversely estimating thermal conductivity from observed temperatures.