"Peter had been restored to his apostleship, but the honor and authority he received from Christ had not given him supremacy over his brethren. This Christ had made plain when in answer to Peter's question, “What shall this man do?” He had said, “What is that to thee? follow thou Me.” Peter was not honored as the head of the church. The favor which Christ had shown him in forgiving his apostasy, and entrusting him with the feeding of the flock, and Peter's own faithfulness in following Christ, won for him the confidence of his brethren. He had much influence in the church. But the lesson which Christ had taught him by the Sea of Galilee Peter carried with him throughout his life. Writing by the Holy Spirit to the churches, he said: DA 817.1"
"Jesus saith unto him, If I will that he tarry till I come, what is that to thee? follow thou me."
The EGW passage directly quotes and discusses John 21:22 in the context of Peter's role and the lesson he learned from Christ. The connection is explicit and central to the argument being made.
"He saith unto him the third time, Simon, son of Jonas, lovest thou me? Peter was grieved because he said unto him the third time, Lovest thou me? And he said unto him, Lord, thou knowest all things; thou knowest that I love thee. Jesus saith unto him, Feed my sheep."
While the EGW passage doesn't directly quote John 21:17, it alludes to the event where Jesus asks Peter if he loves Him and commissions him to feed His sheep. This event is directly related to Peter's restoration and the trust placed in him, which is the main topic of the EGW passage. The connection is thematic and meaningful.
"“The elders which are among you I exhort, who am also an elder, and a witness of the sufferings of Christ, and also a partaker of the glory that shall be revealed: Feed the flock of God which is among you, taking the oversight thereof, not by constraint, but willingly; not for filthy lucre, but of a ready mind; neither as being lords over God's heritage, but being ensamples to the flock. And when the Chief Shepherd shall appear, ye shall receive a crown of glory that fadeth not away.” 1 Peter 5:1-4 . DA 817.2"
"The elders which are among you I exhort, who am also an elder, and a witness of the sufferings of Christ, and also a partaker of the glory that shall be revealed: Feed the flock of God which is among you, taking the oversight thereof, not by constraint, but willingly; not for filthy lucre, but of a ready mind; Neither as being lords over God’s heritage, but being ensamples to the flock. And when the chief Shepherd shall appear, ye shall receive a crown of glory that fadeth not away."
Ellen White directly references 1 Peter 5:1-4 in this passage.