A key objective in any reservoir development plan is to achieve maximum reservoir exploitation which is usually quantified using an economic objective such as net present value (NPV). A key element of such an optimized development plan is an optimized well planning scheme (number, placement and trajectories of the wells). In the well planning phase, it is important to quantify the geological uncertainty. In this study, a new approach is presented in which the targets and thereby the trajectories of the wells are optimized while the geological uncertainties are taken into account. The latter is achieved by using an ensemble of updated reservoir models resulting from assisted history matching (AHM) as the input for the optimization of the field development plan. For the case presented in this study, the reservoir structure, more specific the top and bottom of the reservoir, is assumed to be the main source of uncertainty. To optimize the well targets and trajectories, the Stochastic Simplex Approximate Gradients (StoSAG) methodology is used. A parameterization of the well path is proposed, in which the angles, azimuths and measured depths of the targets are used as controls to optimize the trajectories of the horizontal wells. With this parameterization, the horizontal section is not always straight, in contrast to the approaches presented in many previous publications. The proposed workflow has been applied successfully on a realistic synthetic case inspired from a real field case. The results show that significant increases in objective function can be achieved when well trajectories are optimized constrained to uncertainties in the structural model.