The documentation you referenced doesn't mention to invoke colcon build in the package directory but in the root of the workspace.
colcon doesn't support invoking the command in a subdirectory of the workspace (without providing custom paths to --build-base, --install-base, --log-base, --base-paths) - see https://github.com/colcon/colcon-core/issues/139 for the same feature request.