The below script with change the owner of a group, giving the new owner admin rights to the group.
Connecting to Office 365
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Changing the group owner using Set-DistributionGroup
Change the GroupAlias and NewOwnersEmailAddress to the relevant values.
Set-DistributionGroup "GroupAlias" -ManagedBy "NewOwnersEmailAddress" -BypassSecurityGroupManagerCheck