Display Themed 'username' in Block
You invoke hook_preprocess_username() by rendering the template username. Since D8 has no longer a theme() function the only way to do this is by putting the template in #theme of a render array. In your case multiple times:

public function build() {
  $build = [];
  foreach ($usersFromQuery as $user) {
    $build[] = [
      '#theme' =&gt; 'username',
      '#account' =&gt; $user,
    ];
  }
  return $build;
}