A Jesuit priest who differs with traditional Roman Catholic teaching on homosexual activity has been ordered by the Vatican doctrinal congregation to stop speaking and writing on the subject of homosexuality.

The action against the Rev. Fr. John J. McNeill, S.J., a moral theologian and a founder of dignity, an organization for Catholic homosexuals, came one week before he was to make a major address at Dignity's national convention in Chicago. The ban was issued by Franjo Cardinal Seper, prefect of the Vatican Congregation for the Doctrine of the Faith.

Father McNeill, in a letter to Dignity delegates, said he would obey the Vatican structure and cancel plans to speak in Chicago. However, he insisted that the Vatican directive "does not in any way demand retraction or repudiation of my ideas or judgments . . ."

He also told delegates that he hoped his silence would be "eloquent" and would "symbolize the defenseless silence incurred through the centuries and even today by hundreds of thousands of gay Catholics."

Father O'Neill, 52, who taught at the now-defunct Woodstock Theological College in New York, also was told by the Vatican to remove from future editions of his book. "The Church and the Homosexual." The Latin words "imprimi potest" (it can be printed). That official church sanction was granted after a long delay by the Rev. Fr. Pedro Arrupe, superior general of the Jesuit order.

The book was published last year after a lengthy theological review and several revisions. Father McNeill had complied with a 1974 order by Father Arrupe not to publish because a "condemned book" would not help the Catholic homosexual.

In its directive, the Vatican asserted that Father McNeill has presented a position contrary to traditional Church teaching on homosexuality and that he is guilty of advocacy theology, arguing in favor of an alternative teaching.