Male preference primogeniture. Queen Victoria's Father, Prince Edward, Duke of Kent, was the next in line to the throne after the future William IV, but he died in 1820, before either of his elder brothers. However, as he left surviving offspring, (i.e. Victoria) her place in the line of succession was superior to those of her father's younger brothers, regardless of the fact she was female.
Thanks. My assumption was that since her father was never king, her predecessor’s natural next of kin by right of primogeniture would be his brother, not his niece.