We consider a wireless sensor network, consisting of K heterogeneous sensors and a fusion center (FC), that is tasked with solving a binary distributed detection problem. Each sensor is capable of harvesting and storing energy for communication with the FC. For energy efficiency, a sensor transmits only if the sensor test statistic exceeds a local threshold θ k , its channel gain exceeds a minimum threshold, and its battery state can afford the transmission. Our proposed transmission model at each sensor is motivated by the channel inversion power control strategy in the wireless communication community. Considering a constraint on the average energy of transmit symbols, we study the optimal θ k 's that optimize two detection performance metrics: (i) the detection probability PD at the FC, assuming that the FC utilizes the optimal fusion rule based on Neyman-Pearson optimality criterion, and (ii) Kullback-Leibler distance (KL) between the two distributions of the received signals at the FC conditioned by each hypothesis. Our numerical results indicate that θ k 's obtained from maximizing the KL distance are near-optimal. Finding these thresholds is computationally efficient, as it requires only K one-dimensional searches, as opposed to a K-dimensional search required to find the thresholds that maximize PD.