Answer
The closest male relative to the infant King of Scotland was his cousin John, Duke of Albany, son of Robert Stewart, Duke of Albany. After Robert's death, John inherited his father's titles and position as Lieutenant-General of the kingdom, effectively making him the regent and power behind the throne during the infancy of King James I.