We consider a wireless sensor network, consisting of N heterogeneous sensors and a fusion center (FC), that is tasked with solving a binary distributed detection problem. Each sensor is capable of harvesting randomly arrived energy and storing it in a finite capacity battery. Sensors are informed of their fading channel states, via a bandwidth-limited feedback channel from the FC. Each sensor has the knowledge of its current battery state and its channel state (quantized channel gain). Our goal is to study how sensors should choose their transmit powers such that J-divergence of the received signal densities under two hypotheses at the FC is maximized, subject to certain (battery and power) constraints. We derive the optimal power map, which depends on the energy arrival rate, the battery capacity, and the battery states probabilities at the steady state. Using the optimal power map, each sensor optimally adapts its transmit power, based on its battery state and its channel state. Our simulation results demonstrate the performance of our proposed power adaptation scheme for different system parameters.