Switching modulation involving two or more frequencies exhibits outstanding performance for indirect time-of-flight (i-ToF) LiDAR to address a problem with resolution and ambiguity range.However, the accuracy and precision remain issues when a target is far from the system due to a poorly received signal.This work improves a LiDAR system by introducing adjustable gain on the avalanche photodetector (APD) to enhance the accuracy and precision.The system was exptl. characterized by measuring a target at 5, 25, and 45 m with gain settings of maximum, middle, and no gain.The middle and maximum gain settings improved the signal-to-noise ratio (SNR), accuracy, and precision.Furthermore, the proposed system may be appropriate for environmental remote-sensing systems, such as mapping and autonomous navigation.