Transverse-momentum resummation for boson plus jet production at hadron colliders