The field of freeform illumination design has surged since the introduction of new fabrication techniques that allow for the production of non-axially symmetric surfaces. Freeform surfaces aim to efficiently control the redistribution of light from a particular source distribution to a target irradiance, but designing such surfaces is a challenging problem in the field of nonimaging optics. Optical design strategies have been developed in both academia and industry. In this paper, we consider the design of a single freeform lens that converts the light from an ideal (zero-étendue) point source into a far-field target. We present a mathematical approach and numerically solve the corresponding generalized Monge–Ampère equation of the optical system. We derive this equation using optimal transport theory and energy conservation. We use a generalized least-squares algorithm that can handle a non-quadratic cost function in the corresponding optimal transport problem. The algorithm first computes the optical map and subsequently constructs the optical surface. We demonstrate that the algorithm can generate a peanut-shaped lens for roadlighting purposes and a highly detailed lens that produces an image on a projection screen in the far field.