Metalens has the advantages of high design freedom, light weight and easy integration, thus provides a powerful platform for infrared detection. Here, we numerically demonstrated a broadband achromatic infrared all-dielectric metalens over a continuous 800 nm bandwidth, with strong environmental adaptability in air, water and oil. By building a database with multiple 2π phase coverage and anomalous dispersions, optimizing the corrected required phase profiles and designing the sizes and spatial distributions of silicon nanopillars, we numerically realized the design of broadband achromatic metalens. The simulation results of the designed metalens show nearly constant focal lengths and diffraction-limited focal spots over the continuous range of wavelengths from 4.0 to 4.8 μm, indicating the ability of the designed metalens to detect thermal signals over a temperature range from various fault points. Further simulation results show that the metalens maintains good focusing performance under the environment of water or oil. This work may facilitate the application of metalens in ultra-compact infrared detectors for power grid faults detection.