A method for finding minimum energy paths of transitions in magnetic systems is presented. The path is optimized with respect to orientation of the magnetic vectors while their magnitudes are fixed or obtained from separate calculations. The curvature of the configuration space is taken into account by: (1) using geodesics to evaluate distances and displacements of the system during the optimization, and (2) projecting the path tangent and the magnetic force on the tangent space of the manifold defined by all possible orientations of the magnetic vectors. The method, named geodesic nudged elastic band (GNEB), and its implementation are illustrated with calculations of complex transitions involving annihilation and creation of skyrmion and antivortex states. The lifetime of the latter was determined within harmonic transition state theory using a noncollinear extension of the Alexander-Anderson model.