They were chosen by lottery and divided into groups, pulling a cart carrying the keep with ropes.
Archived version: https://archive.is/newest/https://www.straitstimes.com/asia/east-asia/1000-people-in-japan-help-tow-400-tonne-hirosaki-castle-keep-closer-to-original-position
Disclaimer: The article linked is from a single source with a single perspective. Make sure to cross-check information against multiple sources to get a comprehensive view on the situation.



TYVM!