A Melbourne man convicted for pledging allegiance to Islamic State has been jailed over preparing for a terrorist act.