A Melbourne man will run his first marathon in more than 20 years after he was nearly killed by a tram.