$g->teleport($this->getServer()->getLevelByName($island->get("World"))->getSafeSpawn(), 0, 0); Error: Call to a member function getSafeSpawn on null
I don't know what $island is, but my guess is that you're trying to get a world that isn't loaded. Load the level before this code, and you should have no issue.
Yes you can get your job in an async task done, load world and teleport on finish of loading process.