"History is the study of change over time. Historical fiction brings history to life by placing appealing characters in accurately described historical settings. Historical fiction is realistic fiction set in a time remote enough from the present to be considered history. Although the story is imaginary, it is within the...
"History is the study of change over time. Historical fiction brings history to life by placing appealing characters in accurately described historical settings. Historical fiction is realistic fiction set in a time remote enough from the present to be considered history. Although the story is imaginary, it is within the realm of possibility that such events could have occurred. In these stories, historical facts blend with imaginary characters and plot (Lynch-Brown, 1999)." (Barbara Pace, Ph.D., "Historical Fiction Genre Study")
In part, your question is the result of great fiction and in part the result of historical fiction. As you can see from Barbara Pace's definition of historical fiction above, it combines real settings and real occurrences with fictional characters and fictional story action. In Kidnapped, Stevenson puts a fictional David Balfour in a fictional situation in which his miserly fictional uncle has him kidnapped by the mercenary fictional Captain Hoseason. It is this fictional action that allows David to meet Stevenson's representation of the historical figure, Alan Breck Stewart, whose name in Gaelic was Ailean Breac Stiùbhart. To summarize so far: David Balfour and Uncle Ebenezer are fictional though though some suggest David's character was inspired by Irishman James Annesley (1715–1760), a claimant to the title Earl of Anglesey. Alan Breck Stewart is an historical person.
Stiùbhart (i.e., Stewart) was a fighter in the Jacobite Risings that occurred at various times from 1689 to 1745, when a failed rising put an end to the force of the Jacobite movement. What were Jacobite Risings? [Jacobite is the Latin word relating to the English name James.] King James II and VII of England and Scotland, a Catholic king, was deposed from the throne in favor of his Protestant brother Charles. The Scots, for James was a Scotsman, rose up in rebellion to have James and then his heirs reestablished on the thrones of Scotland and England. Ailean Breac Stiùbhart played a memorable role in the Rising of 1745. Enlisted in the English army of Charles II (who replaced James), he seems to have deserted and defected to the Scottish Jacobite side, then fought against Charles until fleeing to exile in France.
Stevenson's Kidnapped takes up the adventure in 1751 when Alan comes back from the safety of exile in France to the shores of England with a "price on" his head for being a deserter and a rebel. Ailean Breac Stiùbhart was sent back to Scotland from exile in France to collect the rents of the Jacobite clan chiefs hiding in safety in France (he later is wrongly accused of murder in 1752). To put all of this together: The setting is historical; the story actions are fictional; the premise of Alan returning to England with a price on his head is historical.
Now we know that the answer to your question is yes, Kidnapped is fictional in storyline and most major characters. Yet, Kidnapped is historical in times, events and issues, and some characters, including Alan and the Highland chieftains, who are historical figures (not at all fictional). The summary is that fictional David has fictional adventures with historical figures in historical times and historical events; thus it is historical fiction. [It is interesting to note that when Stevenson wrote Kidnapped, he was writing what he called a romance full of exciting adventure.]