This study aims to develop an intelligent, rapid porosity prediction methodology for additive manufacturing (AM) processes under varying process conditions by leveraging knowledge transfer from the existing process conditions. Conventional machine learning (ML) algorithms are extensively used in porosity prediction for AM processes. These approaches assume that the underline distribution of the source (training) and target (testing) is the same and that target labels are available for modeling purposes. However, the source and target sometimes follow different distributions in real-world manufacturing environments as the diversity of industrialization processes leads to heterogeneous data collection under different production conditions. This will reduce the ability of decision-making with conventional approaches. Transfer learning (TL) is one of the robust techniques that enables transferring learned knowledge between the target and source to establish a robust relationship while the target has fewer data. Therefore, this paper presents an unsupervised grouping-based transfer learning method to characterize the relationship between an unknown target and sources. The similarities between sources and targets are learned by forming a new mixed domain, which organizes data into identity groups. Then, a group-based learning process is designated to transfer knowledge to make target predictions. The effectiveness of the proposed method is evaluated by predicting porosity based on thermal images collected from the AM process under different process conditions, i.e., single-source and multi-source transfer to target porosity prediction. The performance comparison demonstrates that the in situ porosity prediction using the proposed method outperformed state-of-art classification models support vector machine (SVM), convolutional neural network (CNN), and different TL methods such as TL with NNs (TLNN), and TL with CNNs (TLCNN).