Nonlocal magnetic configuration controlling realized in a triple-quantum-dot Josephson junction