Normally surrounded is exactly as you say, where something is all around someone else. As you will see in comments, some native speakers find the usage in your example perfectly natural.
We do also say
- He was cornered by the guards
- He was blocked in by the guards
In your example, perhaps
- John had his back to the wall: the men had him cornered
Native speakers aren't agreed on whether it naturally suits your example, and though he is clearly surrounded, it might not be the men which surround him. Here's a sentence where he's surrounded, but not by the men:
- John was in the corner with his back against the wall and his enemy in front, he was completely surrounded
OED gives
surround v
a. To enclose, encompass, or beset on all sides; to stand, lie, or be situated around; also, to form the entourage of; often passive const. with or by = to have on all sides or all round.
b. [figurative usage]
c. Military. To enclose (a place, or a body of troops) on all sides so as to cut off communication or retreat; to invest.
One of the examples of the military usage is "1802 C. James New Mil. Dict. "A town is said to be surrounded when its principal outlets are blocked up."
Merriam-Webster gives
surround transitive verb
(1) : to enclose on all sides : envelop the crowd surrounded her
(2) : to enclose so as to cut off communication or retreat : invest entry 2
[other related meanings]