not military. People seem to forget Starfleet is just that.
The Enterprise is a “ship of exploration”, as they remind us every other episode. It has a ton of biological and astronomical labs on board. Their mission is:
to explore strange new worlds; to seek out new life and new civilizations; to boldly go where no man / one has gone before
That’s the mission of a diplomatic vessel. They just also have weapons. It’s 100% not a military ship. Starfleet itself is repeatedly described as not a military organization.
The only “military” version of the Enterprise D is in the TNG episode where they encounter the Enterprise C that returns from the past. It’s completely different from the regular version, and the difference between the timelines is stark.