Predicting remaining useful life (RUL) becomes significant to implement prognostics and health management of industrial systems. The relevant studies have contributed to creating RUL prediction models and validating their acceptable performance; however, they are confined to drive reasonable preventive maintenance strategies derived from and connected with such predictive models. This paper proposes a data-driven preventive maintenance method that predicts RUL of industrial systems and determines the optimal replacement time intervals to lead to cost minimization in preventive maintenance. The proposed method comprises: (1) generating RUL prediction models through learning historical process data by using machine learning techniques including random forest and extreme gradient boosting, and (2) applying the system failure time derived from the RUL prediction models to the Weibull distribution-based minimum-repair block replacement model for finding the cost-optimal block replacement time. The paper includes a case study to demonstrate the feasibility of the proposed method using an open dataset, wherein sensor data are generated and recorded from turbofan engine systems.