Yes, the distance does affect its amp rating. The further the distance, the thicker the wire needs to be. So, if you are using an 8 gauge wire for a project that is 50 feet long, the wire will be able to handle the current.  Using an 8 gauge wire for a project that is 100 feet long would not be able to handle the current and will overheat.