“The spirit is willing, but the flesh is weak.” The Greek text contrasts the spirit and flesh quite strongly. This is the use of “spirit” that refers to the action of the mind, i.e., attitudes and emotions. The apostles had a willing attitude, but their flesh was weak and unable to stay awake.
[For more on “spirit,” including a long list of the ways it is used in the Bible, see Appendix 6, “Usages of ‘Spirit.’”]