It is true that Taiwanese individuals cannot use their passport to travel to mainland China. They need to apply for the "Mainland Travel Permit for Taiwan Residents", a travel document specifically for this purpose. An explanation from Wikipedia:
Due to the special political status of Taiwan, neither the PRC nor the ROC recognizes the passports issued by the other and neither considers travel between mainland China and Taiwan as formal international travel. This permit is therefore issued as the travel document for Taiwanese residents to enter mainland China since 1987, when then President of the Republic of China, Chiang Ching-Kuo, decided to lift the mutual travel ban across the Taiwan Strait.
The website of China'a National Immigration Administration has a guide (in Chinese, of course) in applying for this permit. There is a section detailing the documents required. Via Google Translate:
Application materials
(1) Fill out the "Application Form for Taiwan Residents' Travel Permit to the Mainland";
(2) Submit a photo that complies with the "Guidelines for Photographing Entry-Exit Documents";
(3) Submit your valid Taiwan area ID card and Taiwan area entry-exit certificate for inspection. If there is no ID card, the transcript of the household registration or the household registration book shall be submitted for inspection. Submit originals of relevant documents for inspection, and keep copies or electronic scanned copies of ID cards or transcripts of household registration (household registration books).
If both parents are Taiwan residents, if the applicant was born in the mainland and has obtained the Taiwan entry permit, he should submit the applicant's parents' Taiwan compatriot's certificate and his own birth certificate for inspection.
Taiwan residents who stay in the mainland should apply for a certificate for Taiwan compatriots after registering their accommodation in accordance with the "Administrative Measures for Chinese Citizens Traveling to and from Taiwan Area".
There is also an image of the aforementioned "Application Form for Taiwan Residents' Travel Permit to the Mainland" form. This form largely asks for personal details, the frequency of the pass that you're applying, etc. There is, however, a section asking for your occupation which I think is more relevant to your question.

The options are worker, farmer, businessperson, student, company employee, employee in a public institution, soldier, public servant, self-employed and others.
The guide also links to the relevant law that lists the groups of people who are prohibited from entering mainland China.
Prohibited requirements
If the applicant falls under the circumstances specified in Article 19 of the Measures for the Administration of Chinese Citizens Traveling to and from Taiwan, the issuance of the Mainland Travel Permit for Taiwan Residents will not be approved.
Article 19 of the Measures for the Administration of Chinese Citizens Traveling to and from Taiwan states, via Google Translate as well:
Article 19
If a Taiwan resident applying to come to the mainland falls under any of the following circumstances, it will not be approved:
(1) Those who are considered to have committed criminal acts;
(2) Those who are considered to be likely to carry out activities that endanger national security or interests after coming to the mainland;
(3) Those who do not meet the application requirements, or who have fabricated information or provided false certificates and other deceptive acts;
(4) Patients with mental illness or serious infectious diseases;
(5) Other circumstances under which the approval is not granted according to laws and administrative regulations.
Except for medical treatment or other special reasons that can be approved for entry.
There is no condition specifically barring Taiwanese military personnel from entering mainland China.
Furthermore, keep in mind that Taiwan has a policy of conscription "for all qualified males of military age", hence a substantial percentage of the population can be considered "reserve or retired military" and it won't be logical to bar such a significant population from mainland China.
During this process I believe there is a statement that must be signed. I don't know, but my guess is that it has something to do with "clearing up ambiguities" with how One China is interpreted.
I'm not aware of such a statement and the application guide does not mention this either. It's also worth noting that by applying for this permit and not using one's passport to enter mainland China is in itself an implicit acknowledgement of the "One China" policy.
Update
It appears that Taiwan does not allow active-duty soldiers and those involved in national defense to travel to mainland China. See the relevant law, via Google Translate.
Provisions for current and retired (retired) personnel engaged in national defence affairs involving state secrets to apply for work in the mainland
[ ... ]
( 1 ) Political personnel, active duty officers, non-commissioned officers, soldiers, civil (teaching) and employed personnel of the Ministry of National Defense and its affiliated units at various levels are engaged in national defense affairs involving state secrets.
In fact, civil servants face such a restriction too. Taiwan's Mainland Affairs Council has a Q&A (via Google Translate) on the entry requirements for civil servants, although the page does not mention military personnel.