@Debra Law,
Whether or not the court can consider the motive and intent of the president in terms of an executive order, I question whether they can do so based on statements made by the president when he was a candidate.
If Trump tweeted after issuing the executive order "Well, like I promised, I've banned Muslims!" (which would not have been outside the realm of possibilities), I think a pretty solid case could be made that regardless of the EO's wording, Trump, by his own admission, was trying to ban Muslims.
However, the courts that have ruled on this so far have ignored what has been common knowledge for hundreds of years: Candidates, running for president (or any office), say all sorts of things they have no real intention of actually implementing in order to get elected. Once the candidate wins the presidency they have the benefit of expert advice and information that was not available to them during the campaign, and so even if the candidate was serious about his campaign promise, it is not unreasonable to assume that he or she might reconsider it, once president, and decide against it.
The fact that the EO imposes a temporary travel ban and addressed only 7 nations that the prior administration had designated critical trouble spots, and in so doing did nothing to impeded immigration to the US of hundreds of millions of Muslims living elsewhere, makes it a ridiculously ineffective ban on Muslims. It's possible that Trump's intent was to find a way to legally make good on his campaign promise and he really doesn't care about the potential national security implications of immigration from these seven nations, but done of his statements made during or after the campaign support such a conclusion.
The use of Trump's campaign rhetoric offer the only means available to the courts who have heard this case to arrive at a ruling they desired from the start.
Considering the nature of campaign rhetoric that has been demonstrated, time and time again, over our history I will be very surprised if Gorsuch considers it grounds to ignore the text of the EO, which is clearly not a ban on Muslim immigration, because he believes it gives him a clear window into the mind of Trump at the time the EO was prepared and issued. I think Trump wins before the Supreme Court.