Humans also lack free will
Whether or not computers have free will is irrelevant to the issue of whether machines can think as people lack free will and are just as deterministic as machines, but can still think.
This position has been held by many philosophers throughout history. It goes back at least to ancient Greece. For example, Diogenes Laertius attributes to the early Greek atomist Democritus the following view, "All things come into being by necessity, the cause of the coming into being of all things being the vortex, which Democritus calls 'necessity'" (J. Robinson, 1968, p. 212).
Clement ascribes the following also to Democritus, "Nature and teaching are very similar; for teaching transforms a man, and in transforming him makes his nature" (J. Robinson, 1968, p. 219).
In modern time many writers have held that free will is somehow illusory. Here is an example from Baron Holbach, "Man's life is a line that nature commands him to describe upon the surface of the earth, without his ever being able to swerve from it, even for an instant . . . Nevertheless, in spite of the shackles by which he is bound, it is pretended he is a free agent" (Peter van Inwagen, 19??, p. 153).
References
Robinson, John Mansley. 1968. An Introduction to Early Greek Philosophy: the Chief Fragments and Ancient Testimony, with Connecting Commentary. Boston: Houghton Mifflin Company.
van Inwagen, Peter. 1986. An Essay on Free Will, Oxford University Pres USA.