The Reds won that clash at Tynecastle 4-0 to set up a final next Sunday against Inverness.
And St Johnstone, who haven't beaten the Dons this season, now have a chance for revenge against the favourites.
Aberdeen manager Derek McInnes said: "Whoever we got, it was always going to be tough.
"We know each other inside out and, while we came out on top in the League Cup, that will not have any bearing on this one.
"On the face of it, it's a reasonable draw but that would be the case whoever we got at this stage."
The tie will be played at Ibrox on 13 April with a kick-off time of 12:45pm, and will be live on BBC Scotland and Sky Sports.