magento2.4 – Magento2 Add custom link to customer accounts link based on customer group

I have a Magento 2.4 based website and I am trying to add a custom link in the My Accounts side bar box when logged in and viewing the dashboard pages. I am trying to make a link show only for users logged in who belong to the Wholesaler customer group (group id 2)
I have cleared cached and ran upgrade complile deploy however the link is not showing?
Here is my files:


<?xml version="1.0"?>
   <page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="customer_account_navigation">
           <block class="VendorModuleBlockCustomergroupLink" name="media-library-link" after="-">
                 <argument name="label" xsi:type="string">Media Library</argument>
                 <argument name="path" xsi:type="string">media-library</argument>


namespace VendorModuleBlockCustomergroup;

class Link extends MagentoFrameworkViewElementHtmlLinkCurrent
   protected $_customerSession;

   public function __construct(
    MagentoFrameworkViewElementTemplateContext $context,
    MagentoFrameworkAppDefaultPathInterface $defaultPath,
    MagentoCustomerModelSession $customerSession,
    array $data = ()
 ) {
     $this->_customerSession = $customerSession;
     parent::__construct($context, $defaultPath, $data);

protected function _toHtml()
    $responseHtml = null;
    if($this->_customerSession->isLoggedIn()) {

        $customerGroup = $this->_customerSession->getCustomer()->getGroupId();

        if($customerGroup == '2') {
            $responseHtml = parent::_toHtml();
    return $responseHtml;