This study developed a deep-learning-based algorithm to automatically classify five common neonatal respiratory diseases (TTN, RDS, ALS, atelectasis, and BPD) and healthy lungs using chest radiographs in NICUs. A total of 43,338 chest X-rays and demographic data (gestational age and birth weight) were collected from 10 university hospitals and split into training, validation, and test datasets. A modified ResNet50 model was trained, with lung region segmentation performed using a U-Net architecture. The model achieved an accuracy of 86.89% and an F1 score of 86.32%. This research demonstrates the potential for clinical decision support in NICUs.