Distributed Control of Underactuated and Heterogeneous Mechanical Systems