"As I urged you when I went into Macedonia - remain in Ephesus that you may charge some that they teach no other doctrine, nor give heed to fables and endless genealogies, which cause disputes rather than godly edification which is in faith" (1 Timothy 1:3-4).
Is doctrine essential or nonessential to your faith and fellowship with God? Undoubtedly, there was a particular doctrine that was to be taught in Ephesus. All other doctrines were to cease. Timothy was to charge teachers to "teach no other doctrine" than the one that produces "godly edification which is in faith."
Doctrine means teaching, and it is essential that one's teaching (doctrine) conforms with God's truth, the Scriptures. Therefore, doctrine must be "sound" (1 Timothy 1:10), "good" (1 Timothy 4:6), given attention (1 Timothy 4:13), and continued in (1 Timothy 4:16). Doctrine must be God's (1 Timothy 6:1), and it must conform to godliness (1 Timothy 6:3). Apostolic doctrine must be "carefully followed" (2 Timothy 3:10), it must agree with the Scriptures (2 Timothy 3:16), and it must not be rejected (2 Timothy 4:3).
Anyone who says doctrine is not essential to your salvation and fellowship with God is not teaching and applying 2 John 9 properly: "Whoever transgresses and does not abide in the doctrine of Christ does not have God. He who abides in the doctrine of Christ has both the Father and the Son." Oh yes, doctrine matters.