Sure, company dispatchers are usually part of the conversation, and in non-emergency diversions (i.e. the vast majority), they may suggest specific airports that would be more convenient for company logistics. But the final decision is always the pilots' - and once they've declared an emergency, more or less every single airfield, including military, becomes available to them.