A man who helped others operate a multi-million pound smuggling operation that trafficked heroin and cocaine from South America to Scotland has been jailed for five years.