In this work, wireless sensor network localization problem is considered. Finding the three dimensional locations of randomly distributed sensors with limited power and communication ability is a hard problem. When the distances between sensors and anchored nodes are known, problem can be solved by using a linear set of equations for each sensor node. When the number of anchors is less than four, the problem is nonconvex and NP hard and can be solved with an optimization approach. In this work, alternating minimization algorithm is proposed. This structure converges to the optimum solution iteratively. Different problem scenarios are considered and relative sensor locations are obtained without using anchor locations. Effectiveness of the proposed approach is shown by considering several experiments.