BER and distance relation
In short, increasing the distance results in a decrease in $E_b$.
Consider two antennas in an otherwise empty universe (this is known as &quot;free space&quot;). The transmitter antenna radiates $P_t$ watts, and has gain $G_t$ in the direction of the receiver. The transmitted signal has wavelength $\lambda_0$. Then, the receiver antenna, with gain $G_r$ and at distance $d$ from the transmitter, receives a signal with power given by $$P_r = P_tG_rG_t\left(\frac{\lambda_0}{4\pi d}\right)^2.$$
You are assuming transmission at 1 Mb/s. Then, $E_b$ is given by $$E_b = \frac{P_r}{10^6}\frac{\text{joule}}{\text{bit}}.$$ You can see that, as $d$ increases, both $P_r$ and $E_b$ decrease. This causes an increase in the bit error rate.
In environments other than free space, the calculation of $P_r$ is different, since the presence of reflectors, obstacles, etcetera will influence how much power is received. A popular model for urban/suburban/rural environments is the Okomura-Hata model, which is valid for the range of frequencies, distances and antenna heights commonly used in cellular communications. There are many other models that apply in different scenarios, and with varying degrees of complexity and accuracy.