Your code looks good and it should work. I have tried it as the below code: after creating a new app with ARKit template, I have replaced the function viewDidLoad.
override func viewDidLoad() {
super.viewDidLoad()
// Set the view's delegate
sceneView.delegate = self
let box = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0)
let node = SCNNode(geometry: box)
node.position = SCNVector3(0,0,0)
sceneView.scene.rootNode.addChildNode(node)
}
It creates a box at the original point (0, 0, 0). Unfortunately your device is inside the box thus you cannot see that box straightly. To see the box, move your device far aways a bit.
The attached image is the box after moving my device:
If you want to see it immediately, move the box to front a bit, add colour and make the first material be double side (to see it even in or out side):
let box = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0)
box.firstMaterial?.diffuse.contents = UIColor.red
box.firstMaterial?.isDoubleSided = true
let boxNode = SCNNode(geometry: box)
boxNode.position = SCNVector3(0, 0, -1)
sceneView.scene.rootNode.addChildNode(boxNode)