@tanguatlay,
I disagree with the previous posters. British usage is a little different.
I would say two and a half hours walk, and I might write it with an apostrophe, thus:
To get there requires a two and a half hours' walk.
That is, a walk of two and a half hours. The apostrophe makes sense to me.
cf. a man's suit, the day's ending, the tasks' duration.