Since you are trying to change the output returned from a page controller, you are implementing the wrong hook. The output of a page controller doesn't normally go in a block, but in a page. The only block the Search module implement is the SearchBlock class, which just outputs the form to search in a Drupal site, and redirect users to the search page. See its SearchBlock::build() method, which contains just a line of code.
In SearchBlockForm::buildForm(), you see the effective form build for that block.
$route = 'search.view_' . $entity_id;
// Notice the following line that submits the form in the search page showing the results, the one handled by the SearchController.
$form['#action'] = $this->url($route);
$form['#method'] = 'get';
$form['keys'] = array(
'#type' => 'search',
'#title' => $this->t('Search'),
'#title_display' => 'invisible',
'#size' => 15,
'#default_value' => '',
'#attributes' => array('title' => $this->t('Enter the terms you wish to search for.')),
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => $this->t('Search'),
// Prevent op from showing up in the query string.
'#name' => '',
To achieve what you need, you should alter the controller invoked for the search page.
As for your hook not being involved, that is because Drupal doesn't look for the implementations of that hook contained in a theme. In fact, the code invoking it is the following.
// If an alter hook wants to modify the block contents, it can append
// another #pre_render hook.
$module_handler->alter(['block_view', "block_view_$base_id"], $build, $plugin);
The module handler is a service that handles modules, not themes.
Compare that code with the code used to invoke the implementations of
As you see, the code uses the theme manager to invoke the hook implemented by a theme.