This paper presents a distributed kinematic planning algorithm for the end-effector of a multi-segment soft robotic arm to reach the goal position in both 2D and 3D spaces. The planning algorithm runs sequentially from the proximal to the distal segments. For each segment, the planning algorithm only requires the information about the position of itself, the end-effector, and the goal. The 2D planning of each segment is parameterized by a bending angle and an inflation ratio, which are determined by checking the overall geometry of the residual arm and the goal position. The same concept is extended to 3D planning, where parameters include inflation ratio, azimuth angle, and elevation angle for each segment. It is demonstrated in this paper that physical limits of the arm and challenging goal position could lead to failure in goal reaching. To account for this, an iterative learning function is proposed, which allows each segment to learn from past trials and be proactive for goal reaching. The proposed distributed planning algorithm, with iterative learning, demonstrates strong scalability, low computation cost, and robust goal reaching performance. Moreover, it does not need training data to pre-learn the configuration of the arm, which makes the algorithm highly applicable to a wide range of multi-segment soft and continuum robots. Both 2D and 3D simulation results are provided to illustrate the efficacy of the proposed algorithm.