It’s about a 15-minute walk from the Vatican Museum, although you can get to the Basilica from within the museums, then exit directly to the square from there.