One answer on Aviation SE Cockpit vs Flight Deck?says there is a difference between the two. Did NASA use the terms interchangeably, or did they have a reason for using the two different terms?
In shuttle parlance the "flight deck" was the upper floor of the three-story crew module, the middeck was, erm, the middle floor, and the ECLSS (or Lower Equipment) bay was the lower floor.
The flight deck included both the forward facing airplane mode controls and the aft facing robot arm and rendezvous controls. If the term cockpit was used - and in my experience it wasn't much if ever in ops - it would have referred to the forward facing airplane mode controls. In ops these were referred to as "the front seats". The aft facing controls were referred to as "the aft flight deck".
The middeck contained the galley, locker space, the toilet facilities, the airlock or the hatch to the airlock, and the side hatch. Upright and/or recumbent seating could be installed here for ascent and entry.
The ECLSS (or Lower Equipment) bay contained Environmental Control and Life Support Systems and other hardware, and was rarely entered by the crew during a mission.
There was a large project to replace the green-screen onboard displays with modern color displays. This was called the Cockpit Avionics Upgrade project and was one of the few places you'd hear the term used.
Reference: shuttle ops work experience