Yes, there are a couple of differences.
In reality, you are not propelling yourself forward on a treadmill; you are just bouncing up and down on a moving belt.
Also, you are running on a level surface, you are not stepping up and down kerbs or dealing with an uneven surface. It is normally recommended that you set the incline to approx 2% to mimic running outside
You are not regulating your own speed: the treadmill is doing it for you. The treadmill may say you are running 5k in 45 mins but you could be running slower or quicker than that depending on how well the treadmill is calibrated.
I am not trying to put you off. I have the same concerns too! I am currently doing Mara training on a treadmill as the cold weather outside seriously affects my asthma. I know i am in for a couple of tough weeks when I get back outside again