This paper presents a Neyman-Pearson (NP) criterion based optimal distributed detection framework for a massive multiple-input multiple-output (MIMO) wireless sensor network (WSN). Robust fusion rules are determined for the local decisions transmitted by the sensor nodes, considering the availability of both perfect as well as imperfect channel state information (CSI) at the fusion center. Further, the probability of error of the individual sensor decisions, which arises in practical scenarios, is also incorporated in the decision framework. Closed form expressions are derived to characterize the resulting probabilities of detection and false alarm for the system. Simulation results are presented to demonstrate the improved performance of the proposed detectors in comparison to the existing detectors and to validate the theoretical findings.